Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(typescript): allow for files to be nested within outDir
This change corrects a regression introduced by rollup#1728, preventing dual bundle configs from writing output files to directories nested within the directory defined in the tsconfig's outDir property. Example: ```js export default { input: 'src/index.ts', // Replace with the path to your entry TypeScript file output: [ { dir: 'dist/cjs', format: 'cjs', sourcemap: true, preserveModules: true }, { dir: 'dist/esm', format: 'esm', sourcemap: true, preserveModules: true } ], plugins: [ json(), resolve(), commonjs(), typescript({ tsconfig: 'tsconfig.json', compilerOptions: { /* Basic Options */ target: 'ES5', module: 'ES2020', lib: ['ES2019', 'ES2020'], allowJs: true, checkJs: false, /* Strict Type-Checking Options */ strict: true, /* Module Resolution Options */ moduleResolution: 'node', esModuleInterop: true, /* Advanced Options */ forceConsistentCasingInFileNames: true, skipDefaultLibCheck: true, skipLibCheck: true, outDir: path.join(__dirname, 'dist') } }) ], external: deps // Add any external dependencies you don't want to bundle }; ```
- Loading branch information