From d04d83235addf7a52cb69991e511015a26800050 Mon Sep 17 00:00:00 2001 From: Candid Dauth Date: Sat, 16 Apr 2022 14:09:16 +0200 Subject: [PATCH] Support .mjs and .cjs file extension --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 82c336d..e584585 100644 --- a/src/index.ts +++ b/src/index.ts @@ -46,7 +46,7 @@ function cssInjectedByJsPlugin( if ( chunk.type === 'chunk' && - chunk.fileName.includes('.js') && + chunk.fileName.match(/.[cm]?js$/) != null && !chunk.fileName.includes('polyfill') ) { let topCode: string = '';