Conversation
| sources.push({ startIndex, value: urlSource, unquoted }); | ||
| }); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Very bad idea, we should use css-loader for that:
- Introduce new attribute type:
type: src | srcset | style - Run
css-loaderforstyle - Stringify result
Ideally we should have two tests:
- only css-loader
- css-loader +postcss-loader, it is allow to autoprefixing in
styleattribute
There was a problem hiding this comment.
@evilebottnawi I couldn't find a way to run css-loader on a string
all I can think about doing is to export style content to temporary file tmp.css and then find a way to run webpack with css-loader on that file, this will make html-loader depend on css-loader and webpack.
Is there a way to run css-loader only on a string ?
There was a problem hiding this comment.
This is where we should think. In theory we should create virtual module. Maybe we right now we can use css-loader.call(content), maybe we need more options/API for that.
There was a problem hiding this comment.
I need time to think about it.
alexander-akait
left a comment
There was a problem hiding this comment.
Also please avoid prettier changes, we will do it in the other PR
|
any update? or some solution for |
This PR contains a:
Motivation / Use-Case
add support for
urlin css : #259background: url(image.png)=>background-image:url(/webpack/public/path/image.png)Breaking Changes
No
Additional Info