-
Notifications
You must be signed in to change notification settings - Fork 916
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
add option to show hmr error overlay, update docs #1239
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/pikapkg/snowpack/17a1thcjk |
Looks great on the docs side of things 👍 |
@@ -50,6 +50,7 @@ const DEFAULT_CONFIG: Partial<SnowpackConfig> = { | |||
fallback: 'index.html', | |||
hmrDelay: 0, | |||
hmrPort: 12321, | |||
hmrErrorOverlay: 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.
👍🏻
@@ -75,7 +75,10 @@ export function wrapHtmlResponse({ | |||
}); | |||
|
|||
if (hmr) { | |||
const hmrScript = `<script type="module" src="${getMetaUrlPath('hmr-client.js', config)}"></script><script type="module" src="${getMetaUrlPath('hmr-error-overlay.js', config)}"></script>`; | |||
let hmrScript = `<script type="module" src="${getMetaUrlPath('hmr-client.js', config)}"></script>`; | |||
if (config.devOptions.hmrErrorOverlay) { |
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.
👍🏻 Simple! Yet effective.
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.
Looks great!
Nice! Thanks all |
Thanks @briantjacobs ! |
Changes
Adds a
devOptions.hmrErrorOverlay
option for disabling the new error overlay. From discussion: #1229Testing
Ran
snowpack dev --reload
with this in package.jsonDocs
Added an entry into the reference section