Skip to content

Commit 78d8f4a

Browse files
authored
Merge pull request webpack#7691 from mathiasbynens/mjs
Add .mjs to default DelegatedModule options.extensions
2 parents 9f0056b + d8cd5d0 commit 78d8f4a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

declarations.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ declare namespace NodeJS {
77
}
88
}
99

10-
1110
declare module "neo-async" {
1211
export interface Dictionary<T> {
1312
[key: string]: T;

lib/DelegatedModuleFactoryPlugin.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ class DelegatedModuleFactoryPlugin {
1515
constructor(options) {
1616
this.options = options;
1717
options.type = options.type || "require";
18-
options.extensions = options.extensions || ["", ".js"];
18+
options.extensions = options.extensions || [
19+
"",
20+
".wasm",
21+
".mjs",
22+
".js",
23+
".json"
24+
];
1925
}
2026

2127
apply(normalModuleFactory) {

0 commit comments

Comments
 (0)