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: en/guide/assets.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,9 @@ For example, we have this file tree:
18
18
----| index.vue
19
19
```
20
20
21
-
In your CSS, if you use `url('~/assets/image.png')`, it will be translated into `require('~/assets/image.png')`.
21
+
In your CSS, if you use `url('~assets/image.png')`, it will be translated into `require('~/assets/image.png')`.
22
22
23
-
> Note that `~assets` (without a slash) won't work because `~` is a special indicator in `css-loader` and will be resolved to [modules](https://github.com/css-modules/css-modules).
23
+
> Note that starting from Nuxt 2.0 due to css-loader upgradation you should use `~assets` (without a slash) in <url> CSS data type, e.g., background: url("~assets/banner.svg")
0 commit comments