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

loadModule import breaks in production build in Vite + Vue3 + TS #152

Open
isaeedahmed opened this issue Jan 26, 2023 · 1 comment
Open
Labels
bug Something isn't working unconfirmed Unconfirmed issue

Comments

@isaeedahmed
Copy link

isaeedahmed commented Jan 26, 2023

Describe the bug
While trying to import loadModule as show below:

import { loadModule } from "../node_modules/vue3-sfc-loader/dist/vue3-sfc-loader.esm.js"

TS starts complaining and the following error is thrown while building the application:

Could not find a declaration file for module '../node_modules/vue3-sfc-loader/dist/vue3-sfc-loader.esm.js'. 'c:/Users/xxx/Desktop/project_folder/project_title/node_modules/vue3-sfc-loader/dist/vue3-sfc-loader.esm.js' implicitly has an 'any' type.

To Reproduce

Just try to import as above and the error should be reproduced. One question would be that am I importing it wrong? As far as I can see in examples it was supposed to be imported like this.

Versions

  • Browser (name & version): Chrome
  • vue3-sfc-loader: 0.8.4
@isaeedahmed isaeedahmed added bug Something isn't working unconfirmed Unconfirmed issue labels Jan 26, 2023
Repository owner deleted a comment from jbruwes Jan 25, 2024
Repository owner deleted a comment from jbruwes Jan 25, 2024
@lukemovement
Copy link

Try using import { loadModule } from "vue3-sfc-loader";.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed Unconfirmed issue
Projects
None yet
Development

No branches or pull requests

2 participants