isaeed
isaeed

Reputation: 15

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

I am using vue-3-sfc-loader along with Vite,Vue3 and TS. The problem is when I try to import it like:

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

It throws error that:

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

This is not really a problem in development but it breaks my build. Has anybody else faced a similar problem or am I importing it wrong?

Upvotes: 0

Views: 254

Answers (0)

Related Questions