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

Add ability to specify HMR hostname #492

Merged
merged 3 commits into from
Jan 15, 2018

Conversation

suevalov
Copy link
Contributor

@suevalov suevalov commented Jan 4, 2018

I've got a problem after #426 being merged. I'm using parcel for Chrome Plugins development and cannot rely on window.location.hostname value.

Url of the page i'm working on is chrome-extension://<extension-id> and HMR doesn't work, because window.location.hostname is equal to <extension-id>.

This PR adds new hmrHostname option. If it's not set, window.location.hostname is being used.

@suevalov
Copy link
Contributor Author

Any update or feedback?

@devongovett
Copy link
Member

You probably need to add this to the CLI as an option too, right? https://github.com/parcel-bundler/parcel/blob/master/src/cli.js#L16-L20

@codecov-io
Copy link

codecov-io commented Jan 15, 2018

Codecov Report

Merging #492 into master will decrease coverage by 0.31%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #492      +/-   ##
==========================================
- Coverage   88.41%   88.09%   -0.32%     
==========================================
  Files          56       56              
  Lines        1640     1638       -2     
==========================================
- Hits         1450     1443       -7     
- Misses        190      195       +5
Impacted Files Coverage Δ
src/Bundler.js 88.88% <ø> (ø) ⬆️
src/packagers/JSPackager.js 100% <ø> (ø) ⬆️
src/utils/config.js 92.85% <0%> (-3.58%) ⬇️
src/transforms/postcss.js 93.33% <0%> (-0.22%) ⬇️
src/transforms/posthtml.js 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6962a9a...20a3644. Read the comment docs.

@suevalov
Copy link
Contributor Author

@devongovett Good catch, thanks. Added.

@devongovett devongovett merged commit b56b2a9 into parcel-bundler:master Jan 15, 2018
devongovett pushed a commit that referenced this pull request Oct 15, 2018
* Add ability to specify HMR hostname

* Add --hmr-hostname option for cli.js
devongovett pushed a commit that referenced this pull request Oct 15, 2018
* Add ability to specify HMR hostname

* Add --hmr-hostname option for cli.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants