我有一个使用此配置运行的 Vuejs 应用程序:
const BundleTracker = require("webpack-bundle-tracker");
module.exports = {
// on Windows you might want to set publicPath: "http://127.0.0.1:8080/"
publicPath: "http://0.0.0.0:8080/",
outputDir: './dist/',
chainWebpack: config => {
config
.plugin('BundleTracker')
.use(BundleTracker, [{filename: './webpack-stats.json'}])
config.output
.filename('bundle.js')
config.optimization
.splitChunks(false)
config.resolve.alias
.set('__STATIC__', 'static')
config.devServer
// the first 3 lines of the following code have been added to the configuration
.public('http://127.0.0.1:8080')
.host('127.0.0.1')
.port(8080)
.hotOnly(true)
.watchOptions({poll: 1000})
.https(false)
.disableHostCheck(true)
.headers({"Access-Control-Allow-Origin": ["\*"]})
},
};
文件 webpack-stats.json 是这样的:
{"status":"done","publicPath":"http://0.0.0.0:8080/","chunks":{"app":[{"name":"bundle.js","publicPath":"http://0.0.0.0:8080/bundle.js","path":"/home/me/myproject/frontend/dist/bundle.js"}]}}
关于如何为 quasar.conf.js 翻译这个的任何提示?