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

Serve "development" vs. "production" for packages that support it #110

Open
FredKSchott opened this issue Jan 17, 2021 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@FredKSchott
Copy link
Collaborator

Some packages behave differently in development vs. production. Usually, this will be something like extra hooks needed for HMR (React), or better error messages (React, Vue, etc).

The abstract way to support this would be to pass something like ?env=NODE_ENV,development or ?env=NODE_ENV,producton. However, CJS packages would need to be re-built based on these values so it's not something that we can just flip on & off in a CJS world.

In an export maps world, we would still need to support two different builds since we'd resolve entries differently based on dev vs. prod.

For those reasons, we should probably support only NODE_ENV as an option for now, with two different builds for each package that behaves differently for dev vs. prod. Something like: ?env=development or ?dev.

@EpicHigh
Copy link

+1: I'm looking forward to this issue too.

@drwpow drwpow added the enhancement New feature or request label Feb 5, 2021
@MarcDwyer
Copy link

MarcDwyer commented Sep 26, 2021

I see this issue being opened back in January. Is there something stalling the ability to serve both React's dev build and production build? Not being able to use tools such as react-refresh sucks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Skypack Roadmap
  
Awaiting triage
Development

No branches or pull requests

4 participants