diff --git a/src/core/create_compilers/extract_css.ts b/src/core/create_compilers/extract_css.ts index 8b77ac8db..3312954bf 100644 --- a/src/core/create_compilers/extract_css.ts +++ b/src/core/create_compilers/extract_css.ts @@ -253,7 +253,11 @@ export default function extract_css( fs.writeFileSync(`${asset_dir}/${file}`, replaced); }); - const leftover = get_css_from_modules(Array.from(unclaimed), css_map, asset_dir); + unclaimed.forEach(file => { + entry_css_modules.push(file); + }); + + const leftover = get_css_from_modules(entry_css_modules, css_map, asset_dir); if (leftover) { let { code, map } = leftover;