ditch buble, replace uglify with terser

This commit is contained in:
Rich Harris 2018-08-12 17:03:03 -04:00
parent 8a4e915272
commit ff23cd3eeb
2 changed files with 5 additions and 8 deletions

View file

@ -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"
}, },

View file

@ -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()
] ]
}; };