When I run "vue-cli-service build" using npm or other, I can get a "dist" ouput dir which defined in vue.config.js.
module.exports = {
publicPath: '/',
outputDir: 'dist',
}
But, how can I find or where to find or how to defined the "dist" dir if I run "vue-cli-service serve"? I can't see any output dir in the project.
Needs help! Thanks
You can access the binary directly as vue-cli-service in npm scripts, or as ./node_modules/. bin/vue-cli-service from the terminal. You can run scripts with additional features using the GUI with the vue ui command.
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 package. json ).
vue-cli-service lintLints and fixes files. If no specific files are given, it lints all files in src and tests , as well as all JavaScript files in the root directory (these are most often config files such as babel. config. js or .
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.
In development mode (the serve
keyword) files are kept in RAM only - they are not persisted on the hard drive. If you are running the project at the default URL of http://localhost:8080
- then you should be able to see a listing of all the assets by going to http://localhost:8080/webpack-dev-server
There is a config option to ask the Webpack-dev-server to write files to disk -
webpack4: https://v4.webpack.js.org/configuration/dev-server/#devserverwritetodisk-
webpack5(should be): https://webpack.js.org/configuration/dev-server/#devserverdevmiddleware
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