I'm generating a library with Vue CLI 4.4:
vue-cli-service build --target lib --formats=umd,umd-min --name example main.js
As a result, I get a number of files in the dist folder:
example.umd.js
example.umd.min.js
- ...
I'd like to remove the .umd
from the file name. How to accomplish that?
I've tried the following two things in my vue.config.js
, but it did not help:
configureWebpack: {
output: {
filename: 'example.js',
chunkFilename: 'example.[name].js'
}
}
chainWebpack: config => {
config.output.filename('example.js')
config.output.chunkFilename('example.[name].js')
}
It seems vue-cli sets this "postfix" here: https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-service/lib/commands/build/resolveLibConfig.js#L140 Unfortunately, I can't figure out how to override it without forking the whole project.