rollup: 923kb end result

This commit is contained in:
@wwwjim 2020-11-25 17:41:19 -08:00
parent 8c67e1211c
commit 5106cb14ca
4 changed files with 16 additions and 20 deletions

1
.gitignore vendored
View File

@ -19,6 +19,7 @@ slate-storage-addresses.json
1GB_BUCKET_TEST.txt
2GB_BUCKET_TEST.txt
4GB_BUCKET_TEST.txt
stats.html
/**/*/package-lock.json
/**/*/.DS_STORE

16
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -66,11 +66,12 @@
"ws": "^7.3.1"
},
"devDependencies": {
"@rollup/plugin-babel": "^5.2.1",
"@rollup/plugin-commonjs": "^16.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^10.0.0",
"rollup": "^2.33.3",
"@rollup/plugin-babel": "^5.2.1",
"@rollup/plugin-commonjs": "^16.0.0",
"rollup-plugin-terser": "^7.0.2"
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-visualizer": "^4.2.0"
}
}

View File

@ -2,6 +2,7 @@ import babel from "@rollup/plugin-babel";
import commonjs from "@rollup/plugin-commonjs";
import resolve from "@rollup/plugin-node-resolve";
import json from "@rollup/plugin-json";
import visualizer from "rollup-plugin-visualizer";
import { terser } from "rollup-plugin-terser";
@ -21,9 +22,16 @@ const generateOutput = (outputPath) => {
exclude: ["node_modules/**", "**/*.json"],
babelHelpers: "runtime",
}),
resolve({ preferBuiltins: true }),
resolve({
preferBuiltins: false,
}),
commonjs(),
terser(),
terser({
format: {
comments: false,
},
}),
visualizer(),
],
};
};