Skip to content

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

Open
@isaeedahmed

Description

@isaeedahmed

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingunconfirmedUnconfirmed issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions