Skip to content
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

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

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

@lmiller1990 lmiller1990 commented Sep 29, 2020

Great, will need rebase (conflicts).

@FRSgit
Copy link
Author

@FRSgit 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

@lmiller1990 lmiller1990 commented Sep 29, 2020

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

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

@FRSgit FRSgit commented Sep 30, 2020

@lmiller1990 done!

@lmiller1990 lmiller1990 merged commit 51fe4ef into vuejs:master Oct 1, 2020
1 check passed
1 check passed
ci/circleci: build Your tests passed on CircleCI!
Details
@lmiller1990
Copy link
Member

@lmiller1990 lmiller1990 commented Oct 1, 2020

I will release early next week.

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.