File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 2626 },
2727 "scripts" : {
2828 "build-dev" : " rollup -c --watch" ,
29- "build-prod" : " rollup -c"
29+ "build-prod" : " rollup -c --environment production "
3030 }
3131}
Original file line number Diff line number Diff line change 11import resolve from '@rollup/plugin-node-resolve' ;
22import terser from '@rollup/plugin-terser' ;
33
4+ const isProduction = process . env . production ;
5+
46export default [
57 {
68 input : 'src/app.js' ,
79 plugins : [
810 resolve ( ) ,
9- terser ( ) ,
11+ isProduction && terser ( )
1012 ] ,
1113 output : {
1214 format : 'iife' ,
1315 name : 'app' ,
1416 file : 'dist/app.min.js' ,
15- sourcemap : true ,
16- sourcemapFile : 'dist/app.min.js.map'
1717 }
1818 } ,
1919]
Original file line number Diff line number Diff line change 2626 },
2727 "scripts" : {
2828 "build-dev" : " rollup -c --watch" ,
29- "build-prod" : " rollup -c"
29+ "build-prod" : " rollup -c --environment production "
3030 }
3131}
Original file line number Diff line number Diff line change 11import resolve from '@rollup/plugin-node-resolve' ;
22import terser from '@rollup/plugin-terser' ;
33
4+ const isProduction = process . env . production ;
5+
46export default [
57 {
68 input : 'src/app.js' ,
79 plugins : [
810 resolve ( ) ,
9- terser ( ) ,
11+ isProduction && terser ( )
1012 ] ,
1113 output : {
1214 format : 'iife' ,
1315 name : 'app' ,
1416 file : 'dist/app.min.js' ,
15- sourcemap : true ,
16- sourcemapFile : 'dist/app.min.js.map'
1717 }
1818 } ,
1919]
You can’t perform that action at this time.
0 commit comments