You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--modern build app targeting modern browsers with auto fallback
76
-
--target app | lib | wc | wc-async (default: app)
77
-
--formats list of output formats for library builds (default: commonjs,umd,umd-min)
75
+
--mode specify env mode (default: production)
76
+
--dest specify output directory (default: dist)
77
+
--modern build app targeting modern browsers with auto fallback
78
+
--no-unsafe-inline build app without introducing inline scripts
79
+
--target app | lib | wc | wc-async (default: app)
80
+
--formats list of output formats for library builds (default: commonjs,umd,umd-min)
78
81
--inline-vue include the Vue module in the final bundle of library or web component target
79
-
--name name for lib or web-component mode (default: "name" in package.json or entry filename)
80
-
--no-clean do not remove the dist directory before building the project
81
-
--report generate report.html to help analyze bundle content
82
-
--report-json generate report.json to help analyze bundle content
83
-
--watch watch for changes
82
+
--name name for lib or web-component mode (default: "name" in package.json or entry filename)
83
+
--filename file name for output, only usable for 'lib' target (default: value of --name),
84
+
--no-clean do not remove the dist directory before building the project
85
+
--report generate report.html to help analyze bundle content
86
+
--report-json generate report.json to help analyze bundle content
87
+
--skip-plugins comma-separated list of plugin names to skip for this run
88
+
--watch watch for changes
84
89
```
85
90
86
91
`vue-cli-service build` produces a production-ready bundle in the `dist/` directory, with minification for JS/CSS/HTML and auto vendor chunk splitting for better caching. The chunk manifest is inlined into the HTML.
@@ -119,6 +124,35 @@ You can also learn about the available options of each command with:
119
124
npx vue-cli-service help [command]
120
125
```
121
126
127
+
## Skipping Plugins
128
+
129
+
Sometimes, you may want to not use a certain CLI Plugin when running a command. For example you might want to build a version of your app that doesn't include the PWA plugin. You can do that by passing the name of the plugin to the `--skip-plugins` option.
130
+
131
+
```bash
132
+
npx vue-cli-service build --skip-plugins pwa
133
+
```
134
+
135
+
::: tip
136
+
This option is available for _every_`vue-cli-service` command, including custom ones added by other plugins.
137
+
:::
138
+
139
+
You can skip multiple plugins by passing their names as a comma-separated list:
Plugin names are resolved the same way they are during install, as described [here](./plugins-and-presets.md#installing-plugins-in-an-existing-project)
-`cache-loader` is enabled for Vue/Babel/TypeScript compilations by default. Files are cached inside `node_modules/.cache` - if running into compilation issues, always try deleting the cache directory first.
0 commit comments