awesome-webextension / webpack-target-webextension

WebExtension Target for Webpack 5. Supports code-splitting and HMR.
MIT License
46 stars 5 forks source link

Webpack 5.26+: outputPath.replace is not a function #13

Closed fregante closed 3 years ago

fregante commented 3 years ago

I found an issue with this line:

https://github.com/crimx/webpack-target-webextension/blob/d0dc5c448592875b69a42e329736072b11744596/lib/webpack5/AutoPublicPathRuntimeModule.js#L27

Which causes an unhelpful error:

ERROR in webpack/runtime/publicPath
outputPath.replace is not a function

because Webpack's getUndoPath function accepts a string, not a boolean, since v5.26:

https://github.com/webpack/webpack/blob/5dd661cc39c1c59c70859afa55757cdb483418cc/lib/util/identifier.js#L309-L313

https://github.com/webpack/webpack/commit/7dc945f147a189386de82d7b1a362fb737aeb414

crimx commented 3 years ago

@Jack-Works Any idea how to fix this?