-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
Description
- Read the docs.
- Use Vite >=2.0. (1.x is no longer supported)
Describe the bug
In beta.36, import moment. It is a function
import moment from 'moment'
console.log(moment)
=>
ƒ hooks() {
return hookCallback.apply(null, arguments);
}
In beta.49, import moment. It is a Object
import moment from 'moment'
console.log(moment)
=>
{__esModule: true}
default: (...)
__esModule: true
get default: () => moment_default
__proto__: Object
}Is this expected or a bug?Why the two results are inconsistent
Reproduction
- git clone https://github.com/vbenjs/vite-moment-bug
- yarn && yarn serve
- Switch the vite version to vite.49 and re-execute the above steps
System Info
viteversion: bete.49- Operating System: mac
- Node version: 12
- Package manager (npm/yarn/pnpm) and version:yarn
Reactions are currently unavailable