-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
less-loader should rewrite url(...) in less files #8
Comments
Can you bring in an example? Theoretically this should work. |
Should be fixed with ad8adde Maybe yours is a special case? |
That's the example:
|
As you can see webpack can't find |
Well, as @sokra pointed out, theoretically they should be rewritten. We just need to find out, why this isn't the case. 😉 |
Well, I made several tests proving that rewriting urls works as intended. However, I've spotted that less has an issue with dynamic In your case you can simply override the variable to change the path. Of course, that's just a quickfix but I think this needs to be fixed by less. |
@jhnns not sure how I can set variable because I don't know where bootstrap package is (node_modules? global node_modules?). |
ok, I can just use |
Just set |
Can you guys help me fix this? I'm having the same problem. //my-app.less
@icon-font-path: '../node_modules/bootstrap/fonts/';
@import '../node_modules/bootstrap/less/bootstrap.less';
@import 'bootstrap-overrides.less'; |
Ok, I had to at this configs to the module: {
loaders: [
/* other loaders */
{
test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
loader: "url?limit=10000&minetype=application/font-woff"
}, {
test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/,
loader: "url?limit=10000&minetype=application/font-woff"
}, {
test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
loader: "url?limit=10000&minetype=application/octet-stream"
}, {
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
loader: "file"
}, {
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
loader: "url?limit=10000&minetype=image/svg+xml"
}]
} |
I think I should be spelled |
Yeah. Sorry for the typo |
Right now when trying to load bootstrap it fails because it tries to resolve
url(...)
extracted from already rendered CSS, of courseurl(...)
are incorrect because they are relative to original filenames.A simple fix:
seems to work, but I've found that we can apply another patch to less compiler for a "cleaner" way to do that.
The text was updated successfully, but these errors were encountered: