From d8cd5d04deebb95a1186517d9b1f54eb402c42fb Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Mon, 9 Jul 2018 22:16:01 +0200 Subject: [PATCH] Add .mjs to default DelegatedModule options.extensions --- declarations.d.ts | 1 - lib/DelegatedModuleFactoryPlugin.js | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/declarations.d.ts b/declarations.d.ts index 81a0b7c0f29..bd50da6c9b9 100644 --- a/declarations.d.ts +++ b/declarations.d.ts @@ -7,7 +7,6 @@ declare namespace NodeJS { } } - declare module "neo-async" { export interface Dictionary { [key: string]: T; diff --git a/lib/DelegatedModuleFactoryPlugin.js b/lib/DelegatedModuleFactoryPlugin.js index 26db0066f75..a0a05a43878 100644 --- a/lib/DelegatedModuleFactoryPlugin.js +++ b/lib/DelegatedModuleFactoryPlugin.js @@ -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) {