Skip to content

Commit 84755db

Browse files
committed
extensions
1 parent b7ea8be commit 84755db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/plugin.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,8 @@ const {entryResources} = require("./entry-inject-loader")
394394
watchEntryRecord(compiler) {
395395
compiler.hooks.thisCompilation.tap(pluginName, (compilation) => {
396396
compilation.hooks.addEntry.tap(pluginName, (entry) => {
397-
getEntrysPath(entry, compiler.options.context, compiler.options.resolve.extensions).forEach(path => {
397+
const extensions = (compiler.options.resolve.extensions || []).concat(['.wasm', '.mjs', '.js', '.json'])
398+
getEntrysPath(entry, compiler.options.context, extensions).forEach(path => {
398399
entryResources.add(path)
399400
})
400401
})

0 commit comments

Comments
 (0)