I have a vue.config.js
file in my project's base directory. I'd like to move this next to my other config files in a /config/
folder.
How can I specify the new location of this file for vue-cli
?
Vue CLI 3 is a complete rewrite of the previous version of the Vue command line interface tool and comes with a set of new features which makes Vue development and the management of Vue projects a lot easier: Out-of-the-box support for Babel, TypeScript, ESLint, PostCSS, PWA, Unit Testing & End-to-end Testing.
defineConfig is a bypass function with type hints, which means you can also omit it if you don't need the autocompletion/typecheck. windi.config.js. export default { /* configurations... */ } You can use the autocompletion from your editor to see possible configuration fields.
The webpack-simple template has the webpack-config. js file directly in root of your project folder. Looks like you are using webpack template. To make changes to the webpack config goto the build folder.
The environment variable VUE_CLI_SERVICE_CONFIG_PATH
specifies the absolute path to vue.config.js
. Relative paths for this variable fail on macOS (and probably other platforms).
Example on command line:
$ VUE_CLI_SERVICE_CONFIG_PATH=$PWD/config/vue.config.js npm run build
Or in package.json
:
{
"scripts": {
"build": "VUE_CLI_SERVICE_CONFIG_PATH=$PWD/config/vue.config.js vue-cli-service build"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With