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
{{ message }}
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
For context, the option I wish to adjust is html-loader's attr option, which defaults to ['img:src'], but I'd like to change to ['img:src', 'link:href'] so it picks up favicons (<link href="...">).
If we did add such an option, we'd probably have to call it htmlLoader or similar, since html is already taken for the options passed to html-webpack-plugin.
My workaround in the meantime:
neutrino.config.module.rule('html').use('html').tap(options=>({
...options,// Override html-loader's default of `img:src`,// so it also parses favicon images (`<link href="...">`).// TODO: Remove once we update to html-loader 1.0.0+:// https://github.com/webpack-contrib/html-loader/issues/17attrs: ['img:src','link:href'],}));
The text was updated successfully, but these errors were encountered:
If we did add such an option, we'd probably have to call it htmlLoader or similar, since html is already taken for the options passed to html-webpack-plugin.
@mozilla-neutrino/core-contributors thoughts whether we should do this / naming?
Now that the default value for attrs has been updated in #943, Treeherder's has no need to be able to pass custom options to html-loader when used via the react preset.
As such, I'm happy to close this out, unless we feel it's a feature we really should have regardless?
The font, image, style and babel loaders support being passed options via the web preset to configure their behaviour:
https://github.com/mozilla-neutrino/neutrino-dev/blob/v8.0.18/packages/web/index.js#L132-L134
However the html-loader doesn't:
https://github.com/mozilla-neutrino/neutrino-dev/blob/v8.0.18/packages/web/index.js#L104
For context, the option I wish to adjust is html-loader's
attr
option, which defaults to['img:src']
, but I'd like to change to['img:src', 'link:href']
so it picks up favicons (<link href="...">
).If we did add such an option, we'd probably have to call it
htmlLoader
or similar, sincehtml
is already taken for the options passed tohtml-webpack-plugin
.My workaround in the meantime:
The text was updated successfully, but these errors were encountered: