-
Notifications
You must be signed in to change notification settings - Fork 142
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
Initial test of vite integration #1550
Conversation
which will make it easier to iterate. It can get extracted into a real test after.
When using importSyncImplementation:cjs, the amdModules are evaluated lazily, after the eager modules. When using importSyncImplementation:eager (which is needed for vite and any true ES module environment), everything is going to get evaluated in the order it is written here. So we should write the eager modules before the lazy ones.
@@ -0,0 +1,5 @@ | |||
export * from './src/resolver.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this supposed to be comitted? 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. This is working around the fact that our packages all compile to commonjs and the vite config is a real node ES module. Both the implementation and the types go through these top-level reexports, which happens to make the cjs interop work out ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone please do the big yak shave to get all our packages dual compiling as CJS and ESM so I don't have to. 😅
This is not an automated test yet, just an app that you can run and the beginning of vite integrations to make it run.