package.json
{
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"@blueprintjs/core": "^3.22.0",
"@blueprintjs/datetime": "^3.15.1",
"@blueprintjs/select": "^3.11.2",
"@blueprintjs/table": "^3.8.2",
"components": "file:../components",
"fixed-data-table": "~0.6",
"moment": "^2.10.6",
"react": "^15.0.0",
"react-addons-css-transition-group": "^15.6.2",
"react-dom": "^15.0.0",
"react-select": "1.0.0-rc.2",
"react-text-mask": "^5.4.3",
"react-virtualized-auto-sizer": "^1.0.2",
"text-mask-addons": "^3.8.0",
"toastr": "^2.1.4"
},
"devDependencies": {
"@babel/core": "^7.11.6",
"@babel/preset-env": "^7.11.5",
"babel-loader": "^8.1.0",
"css-loader": "^4.3.0",
"style-loader": "^1.2.1",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12"
}
}
build.edn
{:main app.core
:output-to "resources/public/js/index.js"
:output-dir "resources/public/js"
:asset-path "/static/frontend/js/"
:target :bundle
:closure-defines {cljs.core/*global* "window"}}
Advanced build
$ clj -m cljs.main -co build.edn -O advanced -c
$ ls -lah resources/public/js/index.js
olivergeorge staff 1.2M Sep 12 08:36 resources/public/js/index.js
webpack.config.js
const TerserPlugin = require('terser-webpack-plugin');
module.exports = {
optimization: {
minimize: true,
minimizer: [new TerserPlugin({
// 3.9mb 5s
// terserOptions: {
// compress: false, mangle: false,
// },
// 3.08mb 8s
// terserOptions: {
// compress: false, mangle: true,
// },
// Still running after 8 minutes
// terserOptions: {
// compress: true, mangle: true,
// },
})],
},
};
$ npx webpack --progress resources/public/js/index.js -o resources/public/js/app.js
92% chunk asset optimization TerserPlugin