Skip to content

fix: external css properly handle html5-compliant syntax #287

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

Conversation

FRSgit
Copy link

@FRSgit FRSgit commented Sep 24, 2020

vue-jest fails when using proper html5 syntax when including external css files.

When I import external CSS in a following way (that's something recommended by vue-loader and only way handled properly by vetur - they do not support highlighting of self-closing style tags):

<style src="./_bootstrap.module.scss" module="$styleBootstrap"></style>

vue-jest fails - it treats this style block as there would be no src attribute at all!

Fixed that case (added content.trim() - that's because vue/component-compiler for <style></style> returns bunch of spaces - something like: " ").

@lmiller1990
Copy link
Member

Great, will need rebase (conflicts).

@FRSgit
Copy link
Author

FRSgit commented Sep 29, 2020

Yea, sure, didn't want to ship these two things (this one & #286) in a single PR, so the conflicts were inevitable here.
It's 2am for me now, will do this tomorrow 😄

@lmiller1990
Copy link
Member

No rush, I tend to releases on fri/sat anyway, so I can test it out a bit!

@FRSgit FRSgit force-pushed the fix-external-css-properly-handle-HTML5-syntax branch from 2586a1e to 909e172 Compare September 29, 2020 08:12
@FRSgit
Copy link
Author

FRSgit commented Sep 30, 2020

@lmiller1990 done!

@lmiller1990 lmiller1990 merged commit 51fe4ef into vuejs:master Oct 1, 2020
@lmiller1990
Copy link
Member

I will release early next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants