Last active
December 4, 2019 13:22
-
-
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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