@olenbetong/appframe-vite 6.5.0 → 6.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/build.js +13 -0
- package/package.json +5 -5
package/lib/build.js
CHANGED
|
@@ -25,6 +25,19 @@ export async function addAppframeBuildConfig(config) {
|
|
|
25
25
|
// Cast visualizer plugin to any to avoid Rollup type version clashes
|
|
26
26
|
plugins: [visualizer({ filename: "./dist/stats.html", gzipSize: true })],
|
|
27
27
|
external: appframe.build.externals !== false ? ["react", "react-dom", "react-dom/client"] : [],
|
|
28
|
+
treeshake: {
|
|
29
|
+
/*
|
|
30
|
+
* `@digdir/designsystemet-react` does not declare `sideEffects: false`, so the
|
|
31
|
+
* bundler has to assume every module reached through its barrel is needed and
|
|
32
|
+
* ships all ~140 components (Combobox, Table, Suggestion, …) even when an app
|
|
33
|
+
* renders a handful. None of its modules have import-time side effects, so opt
|
|
34
|
+
* them in to tree shaking explicitly.
|
|
35
|
+
*
|
|
36
|
+
* Deliberately scoped to `designsystemet-react`: `designsystemet-web` registers
|
|
37
|
+
* custom elements on import and must keep its side effects.
|
|
38
|
+
*/
|
|
39
|
+
moduleSideEffects: (id) => !/[\\/]node_modules[\\/].*designsystemet-react[\\/]/.test(id.replace(/\?.*$/, "")),
|
|
40
|
+
},
|
|
28
41
|
output: {
|
|
29
42
|
globals: appframe.build.externals !== false
|
|
30
43
|
? {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olenbetong/appframe-vite",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.0",
|
|
4
4
|
"description": "Tools to use and deploy Vite applications to Appframe",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -31,23 +31,23 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@olenbetong/appframe-data": "1.5.0",
|
|
33
33
|
"body-parser": "^2.3.0",
|
|
34
|
-
"chalk": "
|
|
34
|
+
"chalk": "6.0.0",
|
|
35
35
|
"chokidar": "^5.0.0",
|
|
36
36
|
"commander": "15.0.0",
|
|
37
37
|
"dotenv": "^17.4.2",
|
|
38
38
|
"fuzzy": "^0.1.3",
|
|
39
39
|
"inquirer": "^14.0.2",
|
|
40
40
|
"inquirer-autocomplete-standalone": "^0.8.1",
|
|
41
|
-
"jsdom": "
|
|
41
|
+
"jsdom": "30.0.1",
|
|
42
42
|
"rollup-plugin-visualizer": "^7.0.1",
|
|
43
43
|
"yaml": "^2.9.0",
|
|
44
44
|
"@olenbetong/appframe-devtools": "0.3.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/jsdom": "^27.0.0",
|
|
48
|
-
"@types/node": "26.
|
|
48
|
+
"@types/node": "26.2.0",
|
|
49
49
|
"typescript": "7.0.2",
|
|
50
|
-
"vite": "8.2.
|
|
50
|
+
"vite": "8.2.1"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"vite": ">=8.1.5"
|