vite-plugin / vite-plugin-dynamic-import

Enhance Vite builtin dynamic import
https://www.npmjs.com/package/vite-plugin-dynamic-import
MIT License
193 stars 11 forks source link

Cannot find module 'vite-plugin-utils' or its corresponding type declarations. #44

Closed NewOverm4n closed 1 year ago

NewOverm4n commented 1 year ago

After checking the vue-tsc types, errors are displayed in the console, but the plugin works correctly. image

tsconfig.json

{
    "compilerOptions": {
        "baseUrl": ".",
        "module": "ESNext",
        "target": "ESNext",
        "strict": true,
        "moduleResolution": "Node",
        "sourceMap": true,
        "allowJs": true,
        "resolveJsonModule": true,
        "useDefineForClassFields": true,
        "jsx": "preserve",
        "noImplicitThis": true,
        "allowSyntheticDefaultImports": true,
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true,
        "isolatedModules": true,
        "preserveValueImports": true,
        "importsNotUsedAsValues": "error",
        "esModuleInterop": true,
        "forceConsistentCasingInFileNames": true,
        "skipLibCheck": true,
        "types": [
            "vitest/globals"
        ]
    },
    "exclude": [
        "node_modules"
    ],
    "include": [
        "./**/*.ts",
        "./**/*.vue",
        "commitlint.config.js",
        "vite.config.ts"
    ]
}
NewOverm4n commented 1 year ago

I got around this by using import.meta.glob without using this plugin.

caoxiemeihao commented 1 year ago

This issue will be fixed in the next version. 😅