Init Vue + Webpack
This commit is contained in:
30
frontend/vue.config.js
Normal file
30
frontend/vue.config.js
Normal file
@@ -0,0 +1,30 @@
|
||||
const BundleTracker = require("webpack-bundle-tracker");
|
||||
|
||||
module.exports = {
|
||||
baseUrl: "http://127.0.0.1:8080/",
|
||||
outputDir: './dist/',
|
||||
|
||||
chainWebpack: config => {
|
||||
|
||||
config.optimization
|
||||
.splitChunks(false)
|
||||
|
||||
config
|
||||
.plugin('BundleTracker')
|
||||
.use(BundleTracker, [{filename: '../frontend/webpack-stats.json'}])
|
||||
|
||||
config.resolve.alias
|
||||
.set('__STATIC__', 'static')
|
||||
|
||||
config.devServer
|
||||
.public('http://0.0.0.0:8080')
|
||||
.host('0.0.0.0')
|
||||
.port(8080)
|
||||
.hotOnly(true)
|
||||
.watchOptions({poll: 1000})
|
||||
.https(false)
|
||||
.headers(
|
||||
{"Access-Control-Allow-Origin": ["\*"]}
|
||||
)
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user