-
-
Notifications
You must be signed in to change notification settings - Fork 621
Closed
Description
- Rollup Plugin Name:
@rollup/plugin-node-resolve - Rollup Plugin Version: 15.3.0
Expected Behavior / Situation
It would be nice if exportConditions always included development or production
vite build will automatically set the production condition while vite dev will automatically set the development condition
References:
https://vite.dev/config/shared-options#resolve-conditions
https://vite.dev/guide/env-and-mode#node-env-and-modes
Libraries like Svelte rely on this for tree-shaking out parts of its bundle or returning different modules based on the value. This works automatically in Vite, but requires extra configuration in Rollup
Actual Behavior / Situation
exportConditions is empty by default
Modification Proposal
If the user has not provided either production or development then set production if NODE_ENV is undefined or production and development otherwise.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels