Skip to content

Commit 399f782

Browse files
committed
build: add chunk name hash
This avoid conflicts in the components repo.
1 parent ef03084 commit 399f782

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/ng_package/rollup/rollup.config.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ if (dtsMode) {
195195
);
196196
}
197197

198+
const outExtension = dtsMode ? 'd.ts' : 'mjs';
199+
198200
/** @type {import('rollup').RollupOptions} */
199201
const config = {
200202
input,
@@ -215,8 +217,9 @@ const config = {
215217
minifyInternalExports: false,
216218
sourcemap: !dtsMode,
217219
banner: bannerContent,
218-
entryFileNames: '[name].' + (dtsMode ? 'd.ts' : 'mjs'),
219-
chunkFileNames: '[name].' + (dtsMode ? 'ts' : 'mjs'),
220+
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,
220223
},
221224
};
222225

0 commit comments

Comments
 (0)