I’ve forked an old Vue.js package that has some issues in it (v-money) and made the necessary changes to accomplish what I need. But now when I try to build using the package’s original method, I’m getting an error:
npm run build
vue build ./src/index.js --config ./build.config.js --dist ./dist/ --prod --lib "--disable-compress"
Usage: vue build [options]
alias of "npm run build" in the current project
Options:
-h, --help display help for command
Unknown option --config.
I’m guessing I’ve got the wrong version of Vue.js installed, as the package didn’t indicate what version it’s supposed to be, but I can’t find anything on the web that shows –config, –dist, –prod, and –lib as build options for Vue.js.
I’ve attempted to build the package as-is without any of my small changes and that fails in the same way.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Install the following dev dependencies from the root of the v-money
project:
npm i -D [email protected]
uglify-es
[email protected]^1
Edit build.config.js
to use the Uglify dependencies installed above:
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
module.exports = {
webpack: {
⋮
plugins: [
new UglifyJSPlugin(),
⋮
]
}
}
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0