mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-22 13:37:58 +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": {
|
"scripts": {
|
||||||
"start": "webpack-dev-server -w",
|
"start": "webpack-dev-server -w",
|
||||||
"prepare": "npm run build",
|
"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": "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:main": "BABEL_ENV=main babel src -s -d lib",
|
||||||
"build:module": "BABEL_ENV=module babel src -s -d module",
|
"build:module": "BABEL_ENV=module babel src -s -d module",
|
||||||
@ -31,7 +32,8 @@
|
|||||||
"react-jss": "^7.2.0",
|
"react-jss": "^7.2.0",
|
||||||
"react-resize-detector": "^1.1.0",
|
"react-resize-detector": "^1.1.0",
|
||||||
"shortid": "^2.2.8",
|
"shortid": "^2.2.8",
|
||||||
"three": "^0.88.0"
|
"three": "^0.88.0",
|
||||||
|
"webpack-bundle-analyzer": "^2.9.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-cli": "6.24.1",
|
"babel-cli": "6.24.1",
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
const path = require('path');
|
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 HTMLWebpackPlugin = require('html-webpack-plugin');
|
||||||
|
|
||||||
const devMode = true;
|
const devMode = process.env.NODE_ENV !== 'production';
|
||||||
|
const analyzeBundle = process.env.ANALYZE_BUNDLE;
|
||||||
|
|
||||||
const babelLoader = {
|
const babelLoader = {
|
||||||
loader: 'babel-loader',
|
loader: 'babel-loader',
|
||||||
@ -61,13 +62,13 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: analyzeBundle ? [new BundleAnalyzerPlugin()] : [
|
||||||
new HTMLWebpackPlugin({
|
new HTMLWebpackPlugin({
|
||||||
title: 'Doodle3D Slicer',
|
title: 'Doodle3D Slicer',
|
||||||
template: require('html-webpack-template'),
|
template: require('html-webpack-template'),
|
||||||
inject: false,
|
inject: false,
|
||||||
appMountId: 'app'
|
appMountId: 'app'
|
||||||
}),
|
})
|
||||||
],
|
],
|
||||||
devtool: "source-map",
|
devtool: "source-map",
|
||||||
devServer: {
|
devServer: {
|
||||||
|
Loading…
Reference in New Issue
Block a user