Skip to content

Commit

Permalink
fix: respect output.file for main CSS chunk
Browse files Browse the repository at this point in the history
  • Loading branch information
Anidetrix committed May 9, 2020
1 parent 5e17b8d commit 19eb9d7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"eslint-config-prettier": "^6.11.0",
"eslint-import-resolver-node": "^0.3.3",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jest": "^23.9.0",
"eslint-plugin-jest": "^23.10.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-unicorn": "^19.0.1",
"fibers": "^5.0.0",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,12 @@ export default (options: Options = {}): Plugin => {
}

const entryIds = moduleIds.filter(id => !ids.includes(id) && isSupported(id));
if (entryIds.length > 0) idsMap.set(entry.name, entryIds);
if (entryIds.length > 0) {
idsMap.set(
opts.file ? path.basename(opts.file, path.extname(opts.file)) : entry.name,
entryIds,
);
}

return idsMap;
};
Expand Down

0 comments on commit 19eb9d7

Please sign in to comment.