Skip to content

Instantly share code, notes, and snippets.

@zaemiel
Created November 20, 2020 14:47
Show Gist options
  • Save zaemiel/1bcde7098afceacb1e1f49fb4616bea9 to your computer and use it in GitHub Desktop.
Save zaemiel/1bcde7098afceacb1e1f49fb4616bea9 to your computer and use it in GitHub Desktop.
The minimal vue.config.js for django-webpack-loader and webpack-bundle-tracker
const BundleTracker = require('webpack-bundle-tracker');
module.exports = {
publicPath: "http://0.0.0.0:8080",
outputDir: "./dist/",
chainWebpack: config => {
config.optimization.splitChunks(false)
config.plugin('BundleTracker').use(BundleTracker, [
{
filename: './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': ['\*']})
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment