Skip to content

Commit

Permalink
docs: fix content hash of webpack example (fix #1728) (#1729)
Browse files Browse the repository at this point in the history
Co-authored-by: Frozen FIsh <76603360+sudongyuer@users.noreply.github.com>
  • Loading branch information
richex-cn and sudongyuer committed Oct 12, 2022
1 parent 477ce2b commit d2b022d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/vue-cli5/vue.config.js
Expand Up @@ -5,6 +5,9 @@ module.exports = {
plugins: [
UnoCSS(),
],
optimization: {
realContentHash: true,
},
},
chainWebpack(config) {
config.module.rule('vue').uses.delete('cache-loader')
Expand Down
5 changes: 5 additions & 0 deletions packages/webpack/README.md
Expand Up @@ -20,9 +20,14 @@ module.exports = {
plugins: [
UnoCSS({ /* options */ }),
],
optimization: {
realContentHash: true,
},
}
```

> If you are using webpack@4.x, the `optimization.realContentHash` configuration is not supported, And you should remove it. Be aware of this [known issue](https://github.com/unocss/unocss/issues/1728) with bundle and [webpack#9520](https://github.com/webpack/webpack/issues/9520#issuecomment-749534245).
Add `uno.css` to your main entry:

```ts
Expand Down

0 comments on commit d2b022d

Please sign in to comment.