ditch buble, replace uglify with terser
This commit is contained in:
@@ -2,13 +2,12 @@
|
|||||||
"name": "svelte-app",
|
"name": "svelte-app",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"npm-run-all": "^4.1.3",
|
||||||
"rollup": "^0.58.2",
|
"rollup": "^0.58.2",
|
||||||
"rollup-plugin-buble": "^0.19.2",
|
|
||||||
"rollup-plugin-commonjs": "^9.1.3",
|
"rollup-plugin-commonjs": "^9.1.3",
|
||||||
"rollup-plugin-node-resolve": "^3.0.3",
|
"rollup-plugin-node-resolve": "^3.0.3",
|
||||||
"rollup-plugin-svelte": "^4.0.0",
|
"rollup-plugin-svelte": "^4.0.0",
|
||||||
"rollup-plugin-uglify": "^3.0.0",
|
"rollup-plugin-terser": "^1.0.1",
|
||||||
"npm-run-all": "^4.1.3",
|
|
||||||
"serve": "^6.5.6",
|
"serve": "^6.5.6",
|
||||||
"svelte": "^2.6.0"
|
"svelte": "^2.6.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import svelte from 'rollup-plugin-svelte';
|
import svelte from 'rollup-plugin-svelte';
|
||||||
import resolve from 'rollup-plugin-node-resolve';
|
import resolve from 'rollup-plugin-node-resolve';
|
||||||
import commonjs from 'rollup-plugin-commonjs';
|
import commonjs from 'rollup-plugin-commonjs';
|
||||||
import buble from 'rollup-plugin-buble';
|
import { terser } from 'rollup-plugin-terser';
|
||||||
import uglify from 'rollup-plugin-uglify';
|
|
||||||
|
|
||||||
const production = !process.env.ROLLUP_WATCH;
|
const production = !process.env.ROLLUP_WATCH;
|
||||||
|
|
||||||
@@ -38,8 +37,7 @@ export default {
|
|||||||
commonjs(),
|
commonjs(),
|
||||||
|
|
||||||
// If we're building for production (npm run build
|
// If we're building for production (npm run build
|
||||||
// instead of npm run dev), transpile and minify
|
// instead of npm run dev), minify
|
||||||
production && buble({ include: ['src/**', 'node_modules/svelte/shared.js'] }),
|
production && terser()
|
||||||
production && uglify()
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user