先提交一下,打个钉子
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
// const JavaScriptObfuscator = require('webpack-obfuscator')
|
||||
|
||||
// Generate pages object
|
||||
const pages = {}
|
||||
|
||||
@@ -22,11 +20,12 @@ chromeName.forEach((name) => {
|
||||
entry: `src/entry/${name}`, template: 'public/index.html', filename: `${fileName}.html`
|
||||
}
|
||||
})
|
||||
|
||||
const isDevMode = process.env.NODE_ENV === 'development'
|
||||
|
||||
module.exports = {
|
||||
pages, filenameHashing: false, chainWebpack: (config) => {
|
||||
pages,
|
||||
filenameHashing: false,
|
||||
chainWebpack: (config) => {
|
||||
config.plugin('copy').use(require('copy-webpack-plugin'), [{
|
||||
patterns: [{
|
||||
from: path.resolve(`src/manifest.${process.env.NODE_ENV}.json`), to: `${path.resolve('dist')}/manifest.json`
|
||||
@@ -34,21 +33,25 @@ module.exports = {
|
||||
from: path.resolve(`public/`), to: `${path.resolve('dist')}/`
|
||||
}]
|
||||
}])
|
||||
}, devServer: {
|
||||
port: 8080, open: true, overlay: {
|
||||
warnings: false, errors: true
|
||||
}, proxy: {
|
||||
},
|
||||
devServer: {
|
||||
port: 8080, open: true, hot: true,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://pdd.jjcp52.com', changeOrigin: true, ws: true, pathRewrite: {
|
||||
'^/api': '/'
|
||||
}
|
||||
}
|
||||
}
|
||||
}, lintOnSave: false, configureWebpack: {
|
||||
},
|
||||
lintOnSave: false,
|
||||
configureWebpack: {
|
||||
output: {
|
||||
filename: `[name].js`, chunkFilename: `[name].js`
|
||||
}, devtool: isDevMode ? 'inline-source-map' : false
|
||||
}, css: {
|
||||
},
|
||||
devtool: isDevMode ? 'inline-source-map' : false
|
||||
},
|
||||
css: {
|
||||
extract: false // Make sure the css is the same
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user