2
0
Эх сурвалжийг харах

Use terser in test-treeshake command (#21650)

Marco Fugaro 4 жил өмнө
parent
commit
10a33e188b

+ 1 - 0
.gitignore

@@ -19,6 +19,7 @@ test/*
 test/*.cmd
 test/unit/build
 test/treeshake/index.bundle.js
+test/treeshake/index.bundle.min.js
 
 
 **/node_modules

+ 17 - 1
test/rollup.treeshake.config.js

@@ -1,12 +1,12 @@
 import resolve from '@rollup/plugin-node-resolve';
 import filesize from 'rollup-plugin-filesize';
+import { terser } from 'rollup-plugin-terser';
 
 export default [
 	{
 		input: 'test/treeshake/index.js',
 		plugins: [
 			resolve(),
-			filesize(),
 		],
 		output: [
 			{
@@ -14,5 +14,21 @@ export default [
 				file: 'test/treeshake/index.bundle.js'
 			}
 		]
+	},
+	{
+		input: 'test/treeshake/index.js',
+		plugins: [
+			resolve(),
+			terser(),
+			filesize( {
+				showMinifiedSize: false,
+			} ),
+		],
+		output: [
+			{
+				format: 'esm',
+				file: 'test/treeshake/index.bundle.min.js'
+			}
+		]
 	}
 ];