Add .mjs to default DelegatedModule options.extensions

This commit is contained in:
Mathias Bynens 2018-07-09 22:16:01 +02:00
parent 499cb3cec2
commit d8cd5d04de
No known key found for this signature in database
GPG Key ID: B6A1C4401A39330B
2 changed files with 7 additions and 2 deletions

1
declarations.d.ts vendored
View File

@ -7,7 +7,6 @@ declare namespace NodeJS {
}
}
declare module "neo-async" {
export interface Dictionary<T> {
[key: string]: T;

View File

@ -15,7 +15,13 @@ class DelegatedModuleFactoryPlugin {
constructor(options) {
this.options = options;
options.type = options.type || "require";
options.extensions = options.extensions || ["", ".js"];
options.extensions = options.extensions || [
"",
".wasm",
".mjs",
".js",
".json"
];
}
apply(normalModuleFactory) {