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

Fix development version in production bundle (Parcel) #1244

Closed
wants to merge 1 commit into from

Conversation

doasync
Copy link

@doasync doasync commented May 9, 2019

When I use parcel build to generate a production bundle for my project that uses react-hot-loader, the bundle ends up containing react-hot-loader.development.js. However I don't want the actual hot reloading code in my production bundle, and react-hot-loader is supposed to omit this when built for production.

parcel-bundler/parcel#1593

Screenshot from 2019-05-10 00-35-25

This PR fixes the issue just by changing the order of production checks

@codecov-io
Copy link

codecov-io commented May 9, 2019

Codecov Report

Merging #1244 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1244   +/-   ##
=======================================
  Coverage   81.41%   81.41%           
=======================================
  Files          37       37           
  Lines        1259     1259           
  Branches      311      311           
=======================================
  Hits         1025     1025           
  Misses        186      186           
  Partials       48       48

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 ef6790d...01245f0. Read the comment docs.

@theKashey
Copy link
Collaborator

This PR fixes the issue just by changing the order of production checks

:tableflip:, are you sure it works as expected? Why I might not worked before?

@theKashey
Copy link
Collaborator

Let's make it more like parcel-bundler/parcel#1593 (comment)
Should be more future proof and may provide better feedback for a user.

@theKashey
Copy link
Collaborator

Implementing this in a form I've proposed in a linked parcel issue.
Going to close this PR and thank you for shedding light on this.

@theKashey theKashey closed this May 11, 2019
@doasync
Copy link
Author

doasync commented May 12, 2019

@theKashey, thanks

@theKashey
Copy link
Collaborator

shipped in v4.8.5

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.

3 participants