Skip to content

Commit

Permalink
Simplify chunk renaming
Browse files Browse the repository at this point in the history
If a package results in two chunks with the same name, then we should consider changing the build to create a single chunk for the given module
  • Loading branch information
larabr committed Apr 3, 2023
1 parent 974d09c commit 50b3310
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const getChunkFileName = (chunkInfo, extension) => {
// index files result in chunks named simply 'index', so we rename them to include the package name
if (chunkInfo.name === 'index') {
const packageName = chunkInfo.facadeModuleId.split('/').at(-2); // assume index file is under the root folder
return `${packageName}.index.${extension}`;
return `${packageName}.${extension}`;
}
return `[name].${extension}`;
};
Expand Down

0 comments on commit 50b3310

Please sign in to comment.