Skip to content
This repository was archived by the owner on Jan 31, 2025. It is now read-only.

Commit e291024

Browse files
author
benholloway
committed
Refer to resolve-url-loader as a solution to url rewriting deficit in Sass
1 parent 74deeb7 commit e291024

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ Since Sass/[libsass](https://github.com/sass/libsass) does not provide [url rewr
102102
- If you're just generating CSS without passing it to the css-loader, it must be relative to your web root.
103103
- If you pass the generated CSS on to the css-loader, all urls must be relative to the entry-file (e.g. `main.scss`).
104104

105-
Library authors usually provide a variable to modify the asset path. [bootstrap-sass](https://github.com/twbs/bootstrap-sass) for example has an `$icon-font-path`. Check out [this example](https://github.com/jtangelder/sass-loader/tree/master/test/bootstrapSass).
105+
More likely you will be disrupted this second issue. It is natural to expect relative references to be resolved like in `.css`; against the (`.scss`) file in which they are specified. Thankfully there are a couple of different ways to make this happen.
106+
107+
- Add the missing url rewriting using the [resolve-url-loader](https://www.npmjs.com/package/resolve-url-loader). Place it directly after the sass-loader in the loader chain.
108+
- Library authors usually provide a variable to modify the asset path. [bootstrap-sass](https://github.com/twbs/bootstrap-sass) for example has an `$icon-font-path`. Check out [this example](https://github.com/jtangelder/sass-loader/tree/master/test/bootstrapSass).
106109

107110
## Source maps
108111

0 commit comments

Comments
 (0)