fix(css): no emit assets in html style tag (use class) (fix #5968)#6048
fix(css): no emit assets in html style tag (use class) (fix #5968)#6048poyoho wants to merge 24 commits intovitejs:mainfrom poyoho:fix/assets-in-style
Conversation
|
oh, how to fix the test error |
There was a problem hiding this comment.
I think the code could use some comments to describe each part's goal, it took me a while to understand the flow. I have one concern below, but otherwise this looks good to me. Pretty neat implementation too! I thought it would be longer.
I'd also prefer if another maintainer more experienced with this could take a look, this is my first time understanding this file 😅
PS: Feel free to add more comments where you see fit.
| js += `\nimport "${id}?html-proxy&index=${inlineModuleIndex}.css"` | ||
| if (classPropsNode) { | ||
| const classPropValue = classPropsNode.value! | ||
| s.remove(inlineStyle.loc.start.offset, inlineStyle.loc.end.offset) |
There was a problem hiding this comment.
Do we need to remove the inline style if classPropsNode is false too?
There was a problem hiding this comment.
false will overwrite the style prop to the class.
There was a problem hiding this comment.
Ah yes. Thanks for the explanation
|
I'm also checking, LGTM too. We are going to try to discuss it in the next team meeting |
|
ok, I will comment it |
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Shinigami <chrissi92@hotmail.de>
Co-authored-by: Shinigami <chrissi92@hotmail.de>
Co-authored-by: Shinigami <chrissi92@hotmail.de>
Co-authored-by: Shinigami <chrissi92@hotmail.de>
|
Does it PR has any difference with #6181? |
|
yes, but I don't know how to mentioned pull request😅 |
|
Please review at the mentioned PR @patak-dev @Shinigami92 @bluwy. |
|
I'm not sure which way to take in the end. I'll change PR name? |
Description
fix: #5968
Additional context
traverseHtml?createHTMLCSSCompiler?What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).