Skip to content

Instantly share code, notes, and snippets.

@rowej83
Last active December 4, 2019 13:22
Show Gist options
  • Save rowej83/f9a16c9c231367b1ba96371db072db2e to your computer and use it in GitHub Desktop.
Save rowej83/f9a16c9c231367b1ba96371db072db2e to your computer and use it in GitHub Desktop.
webpack 4 vue cli 3 - single js and css output with static name (app.js & app.css)
//const path = require('path');
const ExtractTextPlugin = require('mini-css-extract-plugin');
module.exports = {
configureWebpack:{ optimization:{
splitChunks:false
}},
chainWebpack: config => {
config.output
.filename('js/[name].js')
config.plugin('extract-css')
.use(ExtractTextPlugin, [{
filename: 'css/[name].css',
allChunks: true
}])
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment