This repository has been archived by the owner on Feb 15, 2025. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Re: --no-html flag
See #278 for context.
Re: HMR path support
TLDR; Cannot receive HMR updates when bundled JS is served from a different server/port
Here's my dev setup.
I've got an Express server running locally (localhost:3000) that serves up content based on configured modules. A module consists of a manifest file that references the bundled JS file for that module.
Example manifest.json file loaded as a module for a given page:
When the Express server renders the content of the page it injects a new script tag with the src attribute set to the value of the src property from the manifest.json file. This will load the script and allow the app to be rendered into an existing DOM node.
While developing a new module, I'll run
npm start -- --port=8080
on a newly created nwb (preact) app. This means that I can access localhost:8080 during development and utilize HMR functionality. What I can't do is load the app.js served up bynpm start
from within a page in my locally running Express server and utilize HMR functionality because the path for the HMR client is monitoringlocalhost:3000/__webpack_hmr
.Thus, it seems that if you're running on a non-standard host and/or port, a proper path configuration should be passed along to allow HMR to work.
Thoughts?