-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Nuxt module improvements #9
Comments
Hey @pi0 Appreciate your time in looking over the module, thanks! I've fixed up the first issue you mentioned, it makes a lot more sense to do it like this. Would you mind elaborating on what you mean by the second point? I understand the issue but not too sure what you're recommending as the fix. I tried this but it ended up throwing a lot of errors, seemingly the import breaks. const { resolve } = createResolver(import.meta.url)
nuxt.options.alias['@vueuse/schema-org'] = resolve('@vueuse/schema-org') |
The naming might be confusing but resolve is similar to |
Resolves possible package manager issues, see #9
Ah of course, thanks. I added the alias, I had an error when it was resolving to the
So I changed it to resolve to the const schemaOrgPath = dirname(await resolvePath('@vueuse/schema-org'))
nuxt.options.alias['@vueuse/schema-org'] = schemaOrgPath bca8fea#diff-be7ecc6bc17358942938e025d26bee5e5c3664db77e2be717b644d96d3222172R52 |
Going to close this off as all the above issues were resolved, although have now been superseded by v1. If you want to review the latest module, that would be awesome, but understand if you have limited capacity. |
Hi @harlan-zw and thanks for nice Nuxt module! Following up #374, I've made a quick review over the code and here are some improvement suggestions:
ssr
option to conditionally inject plugin here. You can use runtime logic andserverRendered
flag in the payloadto make a difference in the behavior@vueuse/schema-org
is an implicit dependency for Nuxt users (they installnuxt-schema-org
), I would make an alias for@vueuse/schema-org
to it's full path to avoid unwanted behavior with different package managersThe text was updated successfully, but these errors were encountered: