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
Copy file name to clipboardExpand all lines: docs/config/README.md
+49Lines changed: 49 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -344,3 +344,52 @@ See [@vue/cli-plugin-e2e-cypress](https://github.com/vuejs/vue-cli/tree/dev/pack
344
344
### Nightwatch
345
345
346
346
See [@vue/cli-plugin-e2e-nightwatch](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-e2e-nightwatch) for more details.
347
+
348
+
## Example Configurations
349
+
### Disable Hashed Filenames
350
+
While generated static asset filenames contain a hash to [ensure the browser picks up changed files](https://webpack.js.org/guides/caching/#output-filenames) this can be disabled. One common scenario for this is when integrating Vue with a backend that dictates a code structure other than what Vue CLI generates, such as with WordPress or Laravel. To disable the hashed filenames, the following can be added to `[vue.config.js](https://cli.vuejs.org/config/#vue-config-js)`:
When manually overwriting `filename` or `chunkFilename`, `assetsDir` does not need to be included in their path values.
378
+
:::
379
+
## Disable Generating index.html
380
+
When using Vue CLI with an existing backend, you may need to disable the generation of `index.html` so that they generated assets can be used with another default document. To do so, the following can be added to `[vue.config.js](https://cli.vuejs.org/config/#vue-config-js)`:
381
+
382
+
```js
383
+
// vue.config.js
384
+
module.exports= {
385
+
chainWebpack:config=> {
386
+
config.plugins.delete('html')
387
+
config.plugins.delete('preload')
388
+
config.plugins.delete('prefetch')
389
+
}
390
+
}
391
+
```
392
+
393
+
::: warning
394
+
[Modern Mode](https://cli.vuejs.org/guide/browser-compatibility.html#modern-mode) will not work when the `html-webpack-plugin` is disabled.
0 commit comments