Skip to content

Commit 7917088

Browse files
authored
[#20] Support .mjs and .cjs file extension (#19)
1 parent 3b26450 commit 7917088

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function cssInjectedByJsPlugin(
4646

4747
if (
4848
chunk.type === 'chunk' &&
49-
chunk.fileName.includes('.js') &&
49+
chunk.fileName.match(/.[cm]?js$/) != null &&
5050
!chunk.fileName.includes('polyfill')
5151
) {
5252
let topCode: string = '';

0 commit comments

Comments
 (0)