Skip to content

Instantly share code, notes, and snippets.

@elmariachi111
Last active January 16, 2019 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elmariachi111/0d05dd16a9d4b0decdbda3d49aee62c3 to your computer and use it in GitHub Desktop.
Save elmariachi111/0d05dd16a9d4b0decdbda3d49aee62c3 to your computer and use it in GitHub Desktop.

how to extend vue cli with webpack loader

have fun using this

module.exports = {
chainWebpack: config => {
const imgRule = config.module.rule('images')
imgRule.use('file-loader')
.loader('image-webpack-loader')
.tap(options => {
const ret = options || {}
ret.pngquant = {
quality: '65-90',
speed: 4
}
return ret;
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment