-
-
Notifications
You must be signed in to change notification settings - Fork 380
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: ignore single css chunk (close #688) #689
fix: ignore single css chunk (close #688) #689
Conversation
There is just single one issue with test preventing merging this PR to a master branch 😭 |
@@ -171,6 +171,11 @@ function isValidChunkAsset(chunkAsset) { | |||
return chunkAsset.scriptType && !HOT_UPDATE_REGEXP.test(chunkAsset.filename) | |||
} | |||
|
|||
const CSS_FILE = /\.css$/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than testing if all files are CSS, shouldn't it be tested if all files are not JavaScript?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I will modify Regexp and test js.
Should I generate new |
59ebcce
to
a281c65
Compare
Not sure if it's the right answer but in my (now closed 😢) PR I chose to modify the fixtures: I think if your code is working but not passing the tests, it's better to edit tests if possible (tests adapt to code, not the other way). |
merging to continue development from my side... |
fixtures should be always generated from some source code, but look like that moment got lost somewhere. |
While there is no test yet for this use case, it will be very good to double check that current version in master works and/or modify https://github.com/gregberge/loadable-components/tree/master/examples/server-side-rendering to produce the extended stats. |
Summary
Ignore single css chunk when
RequiredChunks
added into HTML output during SSR.Issue: #688