Commit 3a504e02 by caoyanzhi

Merge branch 'feature/打包调整'

parents 7df684ee 46f01009
...@@ -42,7 +42,12 @@ const devWebpackConfig = merge(baseWebpackConfig, { ...@@ -42,7 +42,12 @@ const devWebpackConfig = merge(baseWebpackConfig, {
quiet: true, // necessary for FriendlyErrorsPlugin quiet: true, // necessary for FriendlyErrorsPlugin
watchOptions: { watchOptions: {
poll: config.dev.poll, poll: config.dev.poll,
} },
before(app) {
app.get('/', (req, res) => {
res.redirect(config.dev.assetsPublicPath);
})
},
}, },
plugins: [ plugins: [
new webpack.DefinePlugin({ new webpack.DefinePlugin({
...@@ -82,7 +87,7 @@ module.exports = new Promise((resolve, reject) => { ...@@ -82,7 +87,7 @@ module.exports = new Promise((resolve, reject) => {
// Add FriendlyErrorsPlugin // Add FriendlyErrorsPlugin
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({ devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
compilationSuccessInfo: { compilationSuccessInfo: {
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}${config.dev.assetsPublicPath}`],
}, },
onErrors: config.dev.notifyOnErrors onErrors: config.dev.notifyOnErrors
? utils.createNotifierCallback() ? utils.createNotifierCallback()
......
...@@ -14,7 +14,7 @@ module.exports = { ...@@ -14,7 +14,7 @@ module.exports = {
// Paths // Paths
assetsSubDirectory: 'static', assetsSubDirectory: 'static',
assetsPublicPath: '/', assetsPublicPath: '/member/',
// proxyTable: proxyConfig.proxyConfig, // proxyTable: proxyConfig.proxyConfig,
// Various Dev Server settings // Various Dev Server settings
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
"clean-webpack-plugin": "^0.1.19", "clean-webpack-plugin": "^0.1.19",
"copy-webpack-plugin": "^4.0.1", "copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0", "css-loader": "^0.28.0",
"element-ui": "^2.4.3", "element-ui": "^2.15.6",
"extract-text-webpack-plugin": "^3.0.0", "extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4", "file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1", "friendly-errors-webpack-plugin": "^1.6.1",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment