File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,12 +214,16 @@ const config = {
214214 } ,
215215 } ,
216216 output : {
217+ // Rollup will add a `.d` as part of the filename instead of an extension.
218+ // This will avoid outputting `.d.d.ts`.
219+ sanitizeFileName : fileName => ( fileName . endsWith ( '.d' ) ? fileName . slice ( 0 , - 2 ) : fileName ) ,
217220 minifyInternalExports : false ,
218221 sourcemap : ! dtsMode ,
219222 banner : bannerContent ,
220223 entryFileNames : '[name].' + outExtension ,
221- // Hashing is needed as otherwise rollup will emit files with `.d.d.ts` in some cases.
222- chunkFileNames : '[name]-[hash].' + outExtension ,
224+ // Name this with `_` as this can be useful when examing the output structure
225+ // and also it makes it clearer for users if these are imported by accident.
226+ chunkFileNames : '_[name]-chunk.' + outExtension ,
223227 } ,
224228} ;
225229
You can’t perform that action at this time.
0 commit comments