...
 
Commits (2)
This diff is collapsed.
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"main": "src/index.html", "main": "src/index.html",
"scripts": { "scripts": {
"svelte-dev": "rollup -c -w", "svelte-dev": "rollup -c -w",
"svelte-prod": "rollup -c", "svelte-prod": "rollup -c --environment BUILD:production",
"clean": "rm -rf ./build && mkdir build && mkdir build\\sound", "clean": "rm -rf ./build && mkdir build && mkdir build\\sound",
"precompile": "tweego -d src/index.html > build/index.twee && cp src/*.ttf build && cp src/sound/* build/sound", "precompile": "tweego -d src/index.html > build/index.twee && cp src/*.ttf build && cp src/sound/* build/sound",
"compile": "tweego --head=src/extras.html build/index.twee > build/index.html", "compile": "tweego --head=src/extras.html build/index.twee > build/index.html",
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
"rollup": "^1.9.0", "rollup": "^1.9.0",
"rollup-plugin-node-resolve": "^4.2.2", "rollup-plugin-node-resolve": "^4.2.2",
"rollup-plugin-svelte": "^5.0.3", "rollup-plugin-svelte": "^5.0.3",
"rollup-plugin-terser": "^4.0.4",
"svelte": "^2.16.1" "svelte": "^2.16.1"
}, },
"dependencies": { "dependencies": {
......
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 { terser } from 'rollup-plugin-terser';
const isProduction = process.env.BUILD === 'production';
const sveltePlugin = svelte({ const sveltePlugin = svelte({
// By default, all .svelte and .html files are compiled // By default, all .svelte and .html files are compiled
...@@ -19,5 +22,8 @@ export default { ...@@ -19,5 +22,8 @@ export default {
plugins: [ plugins: [
sveltePlugin, sveltePlugin,
resolvePlugin, resolvePlugin,
isProduction && terser({
sourcemap: false,
}),
], ],
}; };
\ No newline at end of file
This diff is collapsed.