-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Labels
feat: deps optimizerEsbuild Dependencies OptimizationEsbuild Dependencies OptimizationinconsistencyInconsistency between dev & buildInconsistency between dev & buildp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Describe the bug
We had a bug where import * as moment from 'moment'
was called as a function. In development it worked, but in build it did not work.
The correct behavior is that it should not work in development.
Reproduction
https://stackblitz.com/edit/vitejs-vite-amttd2?file=main.js
System Info
Not relevant
Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
feat: deps optimizerEsbuild Dependencies OptimizationEsbuild Dependencies OptimizationinconsistencyInconsistency between dev & buildInconsistency between dev & buildp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)