mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-12-23 03:23:48 +01:00
add analyse script
This commit is contained in:
parent
bbd8bc529d
commit
46408e0668
2032
package-lock.json
generated
2032
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -8,6 +8,7 @@
|
||||
"scripts": {
|
||||
"start": "webpack-dev-server -w",
|
||||
"prepare": "npm run build",
|
||||
"analyze": "ANALYZE_BUNDLE=true webpack -p",
|
||||
"build": "npm run build:main && npm run build:main:settings && npm run build:module && npm run build:module:settings ",
|
||||
"build:main": "BABEL_ENV=main babel src -s -d lib",
|
||||
"build:module": "BABEL_ENV=module babel src -s -d module",
|
||||
@ -31,7 +32,8 @@
|
||||
"react-jss": "^7.2.0",
|
||||
"react-resize-detector": "^1.1.0",
|
||||
"shortid": "^2.2.8",
|
||||
"three": "^0.88.0"
|
||||
"three": "^0.88.0",
|
||||
"webpack-bundle-analyzer": "^2.9.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "6.24.1",
|
||||
|
@ -1,8 +1,9 @@
|
||||
const path = require('path');
|
||||
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||
const HTMLWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
const devMode = true;
|
||||
const devMode = process.env.NODE_ENV !== 'production';
|
||||
const analyzeBundle = process.env.ANALYZE_BUNDLE;
|
||||
|
||||
const babelLoader = {
|
||||
loader: 'babel-loader',
|
||||
@ -61,13 +62,13 @@ module.exports = {
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
plugins: analyzeBundle ? [new BundleAnalyzerPlugin()] : [
|
||||
new HTMLWebpackPlugin({
|
||||
title: 'Doodle3D Slicer',
|
||||
template: require('html-webpack-template'),
|
||||
inject: false,
|
||||
appMountId: 'app'
|
||||
}),
|
||||
})
|
||||
],
|
||||
devtool: "source-map",
|
||||
devServer: {
|
||||
|
Loading…
Reference in New Issue
Block a user