Skip to content

Commit 8a645b1

Browse files
committed
docs: use terser plugin to bundle standalone apps
1 parent ec7f882 commit 8a645b1

File tree

3 files changed

+72
-1
lines changed

3 files changed

+72
-1
lines changed

Documentation/scripts/build-examples.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { fileURLToPath } from 'url';
66

77
import { rollup } from 'rollup';
88

9+
import terser from '@rollup/plugin-terser';
910
import alias from '@rollup/plugin-alias';
1011
import commonjs from '@rollup/plugin-commonjs';
1112
import json from '@rollup/plugin-json';
@@ -301,7 +302,7 @@ async function build() {
301302
],
302303
}),
303304
ignorePlugin(['crypto']),
304-
...(forInlineIife ? [inlineCssUrls()] : []),
305+
...(forInlineIife ? [inlineCssUrls(), terser()] : []),
305306
webworkerPlugin({
306307
targetPlatform: 'browser',
307308
pattern: /^.+\.worker(?:\.js)?$/,

package-lock.json

Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"@rollup/plugin-eslint": "8.0.2",
6060
"@rollup/plugin-json": "4.1.0",
6161
"@rollup/plugin-node-resolve": "13.1.3",
62+
"@rollup/plugin-terser": "^1.0.0",
6263
"@types/node": "^22.13.1",
6364
"autoprefixer": "10.4.7",
6465
"babel-loader": "8.2.5",

0 commit comments

Comments
 (0)