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

SSR in Nuxt3 - DOMParser is not defined #34

Open
platform-kit opened this issue Jun 7, 2024 · 0 comments
Open

SSR in Nuxt3 - DOMParser is not defined #34

platform-kit opened this issue Jun 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@platform-kit
Copy link

platform-kit commented Jun 7, 2024

Describe the bug
When using this in Nuxt3 SSR mode, I get "DOMParser is not defined."

To Reproduce
Steps to reproduce the behavior:

  1. Install this into a fresh Nuxt3 project
  2. Run nuxt generate

Expected behavior
I'd expect the icons to build even without DOMParser (which is only available in a browser context, not in server side Node)

As a first stab at fixing this, I imported
this library

import {DOMParser, parseHTML} from 'linkedom'

at the top of dist/bootstrap-vue-next-icons.mjs. It works, but I am not sure if this is an optimal solution.

@platform-kit platform-kit added the bug Something isn't working label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant