Documentation: need to explain how used vue.config.js in different build modes
See original GitHub issueWhat problem does this feature solve?
No any explanation in docs, why in “build --mode development” ignored vue.config.js file. And how developer can build app with bundled assets and enabled vue-dev-tools
What does the proposed API look like?
vue.config.js:
module.exports = {
...
outputDir: 'dist',
assetsDir: 'app',
indexPath: 'app.html',
...
}
Run:
# vue-cli-service build --mode development
Result:
/dist
/dist/app.html
/dist/app/js
/dist/app/css
/dist/app/img
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Configuration Reference
vue.config.js is an optional config file that will be automatically loaded by @vue/cli-service if it's present in your project root (next to ...
Read more >Custom Build Modes with Vue CLI 3
By default, Vue CLI has 3 different “pre-configured” modes: ... We can fine-tune those webpack builds by using the vue.config.js file.
Read more >Vue.js Cli: How to Use Multiple vue.config.js Configs
It can be useful to have more than one configuration file, for example, to build several code bundles. The config file to use...
Read more >How to direct vue-cli to put built project files in different ...
I just had to do this for a new project using the latest Vue-CLI and it was pretty simple: I just needed to...
Read more >The build Property
Note: This config has been removed since Nuxt 2.0, please use build.loaders.vue instead. Type: Object; Default: nuxt.config.js { ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

https://github.com/vagrantir/vue-cli-test node 8, npm 6, win7 I expect that both command build similar ./dist folder, but in –mode development ./dist have plain structure without bundled css/img assets
./node_modules/.bin/vue-cli-service build./node_modules/.bin/vue-cli-service build --mode development@LinusBorg I found solution for my case by using Vue.config.devtools in main.js and
build --mode production, but it`s not clear from documentation/forum/chat. And in this solution need to additional manipulation for enabling sourceMap.Why build doesn`t work as “expected” in any mode? As for me, “expected” mean the same output result, which managed by .env variables.
At least, it would be good to explain deeper in documentation, why “bulid --mode modeName” makes different result.