diff --git a/scripts/build.js b/scripts/build.js index 73d7336c3..365591e4a 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -14,6 +14,7 @@ files.forEach(async (file) => { outfile: `dist/${file}/index.cjs`, platform: 'node', + tsconfig: 'tsconfig.esbuild.json', loader: { '.node': 'copy', '.ttf': 'file', diff --git a/tsconfig.esbuild.json b/tsconfig.esbuild.json new file mode 100644 index 000000000..f66c402f5 --- /dev/null +++ b/tsconfig.esbuild.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "Node", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "noEmit": true, + "resolveJsonModule": true, + "jsx": "react-jsx", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "incremental": true, + "isolatedModules": true, + "plugins": [ + { + "name": "next" + } + ] + }, + "include": ["src/**/*", ".next/types/**/*.ts", "dist/website/types/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/tsconfig.json b/tsconfig.json index 5bff02fd7..247c2639e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,11 +10,7 @@ "noEmit": true, "resolveJsonModule": true, "jsx": "preserve", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "incremental": true, "isolatedModules": true, @@ -24,12 +20,6 @@ } ] }, - "include": [ - "src/**/*", - ".next/types/**/*.ts", - "dist/website/types/**/*.ts" - ], - "exclude": [ - "node_modules" - ] + "include": ["src/**/*", ".next/types/**/*.ts", "dist/website/types/**/*.ts"], + "exclude": ["node_modules"] }