...
|
...
|
@@ -11,9 +11,10 @@ module.exports = { |
|
|
app: ['./app.js']
|
|
|
},
|
|
|
output: {
|
|
|
path: util.resolve('../server/public'),
|
|
|
path: util.resolve('./build/bundle'),
|
|
|
filename: '[name].[hash:7].js',
|
|
|
chunkFilename: '[name].[hash:7].js'
|
|
|
chunkFilename: '[name].[hash:7].js',
|
|
|
publicPath: '/'
|
|
|
},
|
|
|
resolve: {
|
|
|
extensions: ['.js', '.vue', '.json'],
|
...
|
...
|
@@ -40,11 +41,21 @@ module.exports = { |
|
|
chunks: false,
|
|
|
assetsSort: 'size',
|
|
|
},
|
|
|
historyApiFallback: {
|
|
|
rewrites: [
|
|
|
{ from: /\.html$/, to: '/index.html' },
|
|
|
{ from: /.*?\.(js)|(css)$/,
|
|
|
to: (context) => {
|
|
|
return context.parsedUrl.pathname;
|
|
|
}
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
headers: {
|
|
|
'Access-Control-Allow-Origin': '*'
|
|
|
},
|
|
|
proxy: {
|
|
|
'**': 'http://localhost:6007'
|
|
|
'/Api': 'http://localhost:6007'
|
|
|
}
|
|
|
},
|
|
|
module: {
|
...
|
...
|
@@ -110,7 +121,7 @@ module.exports = { |
|
|
name: ['view', 'libs'],
|
|
|
}),
|
|
|
new CleanWebpackPlugin(['*'], {
|
|
|
root: util.resolve('../server/public'),
|
|
|
root: util.resolve('./build/bundle'),
|
|
|
verbose: true,
|
|
|
dry: false
|
|
|
})
|
...
|
...
|
|