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

fix: rework composition API registration #484

Merged
merged 6 commits into from
May 21, 2021

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented May 17, 2021

  • addresses issue with .mjs format (nuxt + jest)
  • compile composables into single file
  • registers composition API using webpack entrypoint (or, for vite, by overriding ./middleware.js import)
  • retains auto-registration for testing (in cjs export - if process.env.NODE_ENV === 'test')

closes #476, closes #479 (by implementing)

Also should cover nuxt/vite#134 and nuxt/vite#123.

cc: @pi0

* addresses issue with .mjs format (nuxt + jest)
* uses `require.resolve` to locate templates
* compile composables into single file
* reverts 16e21eb (#470)
* retains auto-registration for testing (in cjs export - if `process.env.NODE_ENV === 'test'`)

closes #476, closes #479 (by implementing), closes nuxt/vite#134, closes nuxt/vite#123
package.json Show resolved Hide resolved
src/module/index.ts Outdated Show resolved Hide resolved
src/module/babel-register.ts Outdated Show resolved Hide resolved
@danielroe danielroe merged commit 1e423c3 into main May 21, 2021
@danielroe danielroe deleted the fix/composition-api-registration branch May 21, 2021 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: require is not defined at dist/register when using vite
2 participants