diff --git a/rollup.config.ts b/rollup.config.ts index 18b53bc..4d8b7cb 100644 --- a/rollup.config.ts +++ b/rollup.config.ts @@ -9,9 +9,10 @@ import alias from '@rollup/plugin-alias'; import typescript from '@rollup/plugin-typescript'; const sourceFolder = 'src'; -const types = `${sourceFolder}/types`; +const typesFolder = `${sourceFolder}/types`; const fileName = 'index'; -const indexFile = `src/${fileName}.ts`; +const declarationFile = `${fileName}.d.ts`; +const indexFile = `${sourceFolder}/${fileName}.ts`; export default defineConfig([ { @@ -28,7 +29,7 @@ export default defineConfig([ entries: [ { find: '#types', - replacement: resolve(`${types}/${fileName}.d.ts`), + replacement: resolve(`${typesFolder}/${declarationFile}`), }, ], }), @@ -36,7 +37,8 @@ export default defineConfig([ ], input: indexFile, output: { - file: `${fileName}.d.ts`, + file: declarationFile, + format: 'es', }, }, ]); diff --git a/tsconfig.node.json b/tsconfig.node.json index 2660561..e80cbae 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -3,6 +3,7 @@ "allowImportingTsExtensions": true, "composite": true, "emitDeclarationOnly": true, + "forceConsistentCasingInFileNames": true, "lib": ["ESNext"], "module": "NodeNext", "moduleResolution": "NodeNext",