-
-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add alias feature to rewrite urls #274
Conversation
Codecov Report
@@ Coverage Diff @@
## master #274 +/- ##
=========================================
+ Coverage 98.19% 98.3% +0.11%
=========================================
Files 9 10 +1
Lines 332 354 +22
Branches 75 79 +4
=========================================
+ Hits 326 348 +22
Misses 6 6
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alias is good idea 👍, can you check against webpack 2 / webpack 2 options syntax please?
This will need to be updated to 2.x syntax before it's reviewed. With the defaults updates requiring major versions, this would have to be compatible / focused on Webpack > 2.0 |
Can you sign the CLA and document the feature at readme? |
The code has been rebased, updated to 2.x syntax |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bbtfr Thx
Hi guys,
I found sometimes, it's not easy to change the source file / input file of css-loader, e.g.: when we're using sass files in another package (
bootstrap-sass
), we'll get a lot of complains aboutCannot resolve 'file' or 'directory' ...
.There are tons of questions on Google about this.
For
bootstrap
, we may use$icon-font-path
orbootstrap-loader
, but for other projects, we have nothing.resolve-url-loader
is a solution, but it's based on source-map and makes the compilation much slower.So what do you think if we rewrite urls in
css-loader
?Here's an example to load
bootstrap-sass
withsass-loader
,css-loader
&style-loader
cssLoader.alias
use the same syntax withresolve.alias
, https://webpack.github.io/docs/configuration.html#resolve-alias