Closed raghurana closed 1 year ago
Getting a failed to import with a vite project for a commonjs typescript project
type is set to commonjs in my package.json
and tsconfig.json looks like
{ /* Visit https://aka.ms/tsconfig to read more about this file */ "compilerOptions": { "module": "commonjs", "outDir": "dist", "strict": true, "sourceMap": true, "resolveJsonModule": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "noImplicitAny": true, "skipLibCheck": true }, "exclude": ["node_modules", "vite.config.ts"] }
PS: This works in version 1.0.0
On the last update 1.1.0 I merged PR #12 where it adds support for the ESM module. This functionality can lead to an error when both ESM and Commonjs modules are loaded. Check this doc
Getting a failed to import with a vite project for a commonjs typescript project
type is set to commonjs in my package.json
and tsconfig.json looks like
PS: This works in version 1.0.0