perf: building improvement

This commit is contained in:
baiyongjie 2023-04-15 17:39:26 +08:00
parent 7aa26580ba
commit 30a8c6b579
4 changed files with 5 additions and 35 deletions

View file

@ -22,7 +22,7 @@
"build-backend-docs": "rm -rf ./docs/backend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/backend_api src/becca/entities/*.js src/services/backend_script_api.js src/services/sql.js",
"build-frontend-docs": "rm -rf ./docs/frontend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/app/entities/*.js src/public/app/services/frontend_script_api.js src/public/app/widgets/right_panel_widget.js",
"build-docs": "npm run build-backend-docs && npm run build-frontend-docs",
"webpack": "npx webpack -c webpack-desktop.config.js && npx webpack -c webpack-mobile.config.js && npx webpack -c webpack-setup.config.js",
"webpack": "webpack -c webpack.config.js",
"test-jasmine": "jasmine",
"test-es6": "node -r esm spec-es6/attribute_parser.spec.js ",
"test": "npm run test-jasmine && npm run test-es6",

View file

@ -1,16 +0,0 @@
const path = require('path');
const assetPath = require('./src/services/asset_path');
module.exports = {
mode: 'production',
entry: {
mobile: './src/public/app/desktop.js',
},
output: {
publicPath: `${assetPath}/app-dist/`,
path: path.resolve(__dirname, 'src/public/app-dist'),
filename: 'desktop.js'
},
devtool: 'source-map',
target: 'electron-renderer'
};

View file

@ -1,16 +0,0 @@
const path = require('path');
const assetPath = require('./src/services/asset_path');
module.exports = {
mode: 'production',
entry: {
mobile: './src/public/app/setup.js',
},
output: {
publicPath: `${assetPath}/app-dist/`,
path: path.resolve(__dirname, 'src/public/app-dist'),
filename: 'setup.js'
},
devtool: 'source-map',
target: 'electron-renderer'
};

View file

@ -4,13 +4,15 @@ const assetPath = require('./src/services/asset_path');
module.exports = {
mode: 'production',
entry: {
setup: './src/public/app/setup.js',
mobile: './src/public/app/mobile.js',
desktop: './src/public/app/desktop.js',
},
output: {
publicPath: `${assetPath}/app-dist/`,
path: path.resolve(__dirname, 'src/public/app-dist'),
filename: 'mobile.js'
filename: '[name].js',
},
devtool: 'source-map',
target: 'electron-renderer'
target: 'electron-renderer',
};