-
Notifications
You must be signed in to change notification settings - Fork 331
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
Changing loaders #256
Comments
This isn't supported at the moment - adding support for replacing the default loader with your own Something else I've been keeping for when someone asks for config which can't be made declarative is passing the generated config to a function to allow you to manuallymake whichever changes you want. Combined with allowing default rules to be disabled by passing module.exports = {
webpack: {
rules: {
svg: false
},
config(config) {
config.module.rules.push({...})
}
}
} |
On second thoughts you might be able to override the module.exports = {
webpack: {
rules: {
svg: {
loader: 'svg-inline-loader?classPrefix!image-webpack-loader'
}
}
}
} I'm still going to add support for replacing |
Do you have a timeframe for when support will be added? I'm willing to help. |
That's a bug right there. Quick workaround which will also work after I fix this - add an empty I have a bunch of free time coming up in about 7 hours, so will be able to tackle upgrading to |
- Don't move `loader` config into an `options` object - Validate that rule `use` config is an Array - Add a `path` property to user config when sucessfully loaded - Default rules can now be disabled by configuring them as false - Default rule loader and options are now omitted if you configure `loader` or `use` - Add a separate factory for loaders, which only handles loader+options - Add support for a webpack.config() function which receives the generated config to be edited and returned.
- Don't move `loader` config into an `options` object - Validate that rule `use` config is an Array - Add a `path` property to user config when sucessfully loaded - Default rules can now be disabled by configuring them as false - Default rule loader and options are now omitted if you configure `loader` or `use` - Add a separate factory for loaders, which only handles loader+options - Add support for a webpack.config() function which receives the generated config to be edited and returned.
Any eta on release..? |
The next release will be after #223 lands. |
Ok.. i'm struggling with getting svg's to load inline, it doesn't seem to work with the current setup.. |
- Don't move `loader` config into an `options` object - Validate that rule `use` config is an Array - Add a `path` property to user config when sucessfully loaded - Default rules can now be disabled by configuring them as false - Default rule loader and options are now omitted if you configure `loader` or `use` - Add a separate factory for loaders, which only handles loader+options - Add support for a webpack.config() function which receives the generated config to be edited and returned.
+1 I would also like to change the loader used for svg. |
I have a workaround which worked out for me. I included the loader inside my component. <span dangerouslySetInnerHTML={{__html: require('!svg-inline-loader!./svg/icon.svg')}} /> |
- Don't move `loader` config into an `options` object - Validate that rule `use` config is an Array - Add a `path` property to user config when sucessfully loaded - Default rules can now be disabled by configuring them as false - Default rule loader and options are now omitted if you configure `loader` or `use` - Add a separate factory for loaders, which only handles loader+options - Add support for a webpack.config() function which receives the generated config to be edited and returned.
Fixed in v0.16 |
This issue is a:
I want to change the loaders used for SVG images. Basically I want to SVG's to be inlined, so that I can change the fill color etc.
Am I correct in assuming that it isn't possible right now?
The text was updated successfully, but these errors were encountered: