Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

useSocialTags not defined when using Vite dev server #4

Open
bricehartmann opened this issue Dec 2, 2022 · 0 comments
Open

useSocialTags not defined when using Vite dev server #4

bricehartmann opened this issue Dec 2, 2022 · 0 comments

Comments

@bricehartmann
Copy link

When using Vite's dev server, I get the following error when attempting to use the useSocialTags composable:

ReferenceError: useSocialTags is not defined

This does not happen when building the project; only when using the dev server.

A workaround is to add the following to nuxt.config.ts:

imports: {
    dirs: [
        'node_modules/nuxt-social-tags/dist/runtime/composables',
    ],
},
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant