-
-
Notifications
You must be signed in to change notification settings - Fork 385
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: do not attempt hotreloading when emit is false #953
fix: do not attempt hotreloading when emit is false #953
Conversation
|
@@ -69,6 +69,7 @@ function hotLoader(content, context) { | |||
function pitch(request) { | |||
// @ts-ignore | |||
const options = this.getOptions(/** @type {Schema} */ (schema)); | |||
const emit = typeof options.emit !== "undefined" ? options.emit : true; |
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.
hoisted this so we can access it in the hot reloading path
94c4d25
to
a2742f1
Compare
Codecov Report
@@ Coverage Diff @@
## master #953 +/- ##
==========================================
+ Coverage 89.73% 90.34% +0.61%
==========================================
Files 5 5
Lines 828 829 +1
Branches 221 221
==========================================
+ Hits 743 749 +6
+ Misses 74 70 -4
+ Partials 11 10 -1
Continue to review full report at Codecov.
|
Thank you |
This PR contains a:
Motivation / Use-Case
Fixes #943
When doing SSR it is desirable to still run the same css pipeline so consistent hashes can be produced in the SSR code. However, actually emitting the CSS is unnecessary. Because of this it is custom to set emit to false. In this case, it would be nice to not have
no window.document found, will not HMR CSS
spamming the console as well as same some small computational time.Breaking Changes
Additional Info