Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit 3f888bb

Browse files
authored
avoid corrupting binary files in build (#1246)
1 parent 15569a0 commit 3f888bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/create_compilers/extract_css.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ export default function extract_css(
225225
});
226226

227227
fs.readdirSync(asset_dir).forEach(file => {
228-
if (fs.statSync(`${asset_dir}/${file}`).isDirectory()) return;
228+
if (!file.endsWith('.js') || fs.statSync(`${asset_dir}/${file}`).isDirectory()) return;
229229

230230
const source = fs.readFileSync(`${asset_dir}/${file}`, 'utf-8');
231231

0 commit comments

Comments
 (0)