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

Can't find package exports with Nuxt3 #86

Open
Matthew-Berends-WorkSafe opened this issue Nov 28, 2024 · 1 comment
Open

Can't find package exports with Nuxt3 #86

Matthew-Berends-WorkSafe opened this issue Nov 28, 2024 · 1 comment
Assignees

Comments

@Matthew-Berends-WorkSafe

Unable to get library components with import

To Reproduce
Steps to reproduce the behavior:
Install package into Nuxt project.
Import and run from Page/Component

Expected behavior
Form displays

Additional context
Attempted some nuxtconfig changes:
build -> transpile

No issues when working on Vue app
image

@Matthew-Berends-WorkSafe
Copy link
Author

Matthew-Berends-WorkSafe commented Dec 8, 2024

Working with below code:
Plugin

import { defineNuxtPlugin } from "#app";

export default defineNuxtPlugin(async (nuxtApp) => {
  if (process.client) {
    const vueform = (await import("@formio/vue")).Form;
    nuxtApp.vueApp.use(vueform);
  }
});

Component

<ClientOnly>
  <Form :form="formFields"></Form>
</ClientOnly>
<script setup lang="ts"> import { Form } from "@formio/vue";`

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

No branches or pull requests

2 participants