Skip to content

Commit

Permalink
code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
mrm007 committed Jun 26, 2023
1 parent 732c23c commit 1b26dd1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fixtures/dts-compat/crackle.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from '@crackle/cli/config';

export default defineConfig({
dtsMode: 'declaration',
dtsMode: 'preserve',
});
4 changes: 2 additions & 2 deletions packages/core/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ export interface Config {
* Controls how Crackle generates `.d.ts` files.
*
* - 'bundle' rolls up all `.d.ts` files into a single file
* - 'declaration' generates `.d.ts` files for each file in the source directory, for maximum compatibility with TypeScript
* - 'preserve' generates `.d.ts` files for each file in the source directory, for maximum compatibility with TypeScript
*
* @default 'bundle'
*/
dtsMode: 'bundle' | 'declaration';
dtsMode: 'bundle' | 'preserve';
/**
* Override TypeScript `compilerOptions` for when generating `.d.ts` files.
*
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/package-utils/dts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const createDtsBundle = async (
exports: 'named',
format: 'esm',
experimentalMinChunkSize: Infinity,
...(config.dtsMode === 'declaration'
...(config.dtsMode === 'preserve'
? {
preserveModules: true,
entryFileNames: `[name].${extensionForFormat('dts')}`,
Expand Down

0 comments on commit 1b26dd1

Please sign in to comment.