-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
NODE_ENV=production warning when "parcel watch ..." #2011
Labels
Comments
This should probably get fixed, parcel should not be affected by node env only the output should Sent with GitHawk |
3 tasks
DeMoorJasper
pushed a commit
that referenced
this issue
Sep 17, 2018
--- name: 🙋 fix for watch not working when NODE_ENV is 'production' about: fixes issue #2011 --- <!--- Thanks for filing a pull request 😄 ! Before you submit, please read the following: Search open/closed issues before submitting since someone might have pushed the same thing before! --> ## ↪️ Pull Request <!--- Provide a general summary of the pull request here Does this address an existing issue? --> I understand that Parcel should watch changes every time the watch command is being used. Previously, watch was enabled on dev environment only, while the watch command inserted by users was completely ignored. With this modification, watch is always enabled if the user passes the command in CLI. ## 💻 Examples There is an example in #2011 - first post ## ✔️ PR Todo - [ ] Added/updated unit tests for this change - [ ] Filled out test instructions - [ ] Included links to related issues/PRs <!-- Love parcel? Please consider supporting our collective: 👉 https://opencollective.com/parcel/donate -->
devongovett
pushed a commit
that referenced
this issue
Oct 15, 2018
--- name: 🙋 fix for watch not working when NODE_ENV is 'production' about: fixes issue #2011 --- <!--- Thanks for filing a pull request 😄 ! Before you submit, please read the following: Search open/closed issues before submitting since someone might have pushed the same thing before! --> ## ↪️ Pull Request <!--- Provide a general summary of the pull request here Does this address an existing issue? --> I understand that Parcel should watch changes every time the watch command is being used. Previously, watch was enabled on dev environment only, while the watch command inserted by users was completely ignored. With this modification, watch is always enabled if the user passes the command in CLI. ## 💻 Examples There is an example in #2011 - first post ## ✔️ PR Todo - [ ] Added/updated unit tests for this change - [ ] Filled out test instructions - [ ] Included links to related issues/PRs <!-- Love parcel? Please consider supporting our collective: 👉 https://opencollective.com/parcel/donate -->
devongovett
pushed a commit
that referenced
this issue
Oct 15, 2018
--- name: 🙋 fix for watch not working when NODE_ENV is 'production' about: fixes issue #2011 --- <!--- Thanks for filing a pull request 😄 ! Before you submit, please read the following: Search open/closed issues before submitting since someone might have pushed the same thing before! --> ## ↪️ Pull Request <!--- Provide a general summary of the pull request here Does this address an existing issue? --> I understand that Parcel should watch changes every time the watch command is being used. Previously, watch was enabled on dev environment only, while the watch command inserted by users was completely ignored. With this modification, watch is always enabled if the user passes the command in CLI. ## 💻 Examples There is an example in #2011 - first post ## ✔️ PR Todo - [ ] Added/updated unit tests for this change - [ ] Filled out test instructions - [ ] Included links to related issues/PRs <!-- Love parcel? Please consider supporting our collective: 👉 https://opencollective.com/parcel/donate -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
💬 RFC
In short: when somehow environment variable
NODE_ENV
is set toproduction
, commandparcel watch ...
builds the stuff and ends immediately which is quite strange behavior and it's not documented (or I've overlooked it :) ). Also when dev server is started, rebuilding is just done one time.Proposal is to add this behavior to the doc (in some bold) or at least provide some warning in
watch
andserve
command OR normalize behavior, thuswatch
will not be affected - it will still run, just it could build for the target environment (prod/dev/whatever/...)🔦 Context
I've used Docker image which provides by default
NODE_ENV=production
and I was wondering, why parcel is not watching :).💻 Examples
The text was updated successfully, but these errors were encountered: