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

Initial test of vite integration #1550

Merged
merged 46 commits into from
Jul 20, 2023
Merged

Initial test of vite integration #1550

merged 46 commits into from
Jul 20, 2023

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Jul 20, 2023

This is not an automated test yet, just an app that you can run and the beginning of vite integrations to make it run.

ef4 added 30 commits July 3, 2023 16:13
This is really more about testing vite than stabilizing a v2 app format.
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';
Copy link
Collaborator

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? 🙃

Copy link
Contributor Author

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.

Copy link
Contributor Author

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. 😅

@ef4 ef4 merged commit 7407f3a into main Jul 20, 2023
392 checks passed
@ef4 ef4 deleted the vite-app branch July 20, 2023 18:54
@mansona mansona added the enhancement New feature or request label Jul 20, 2023
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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants