Hi, For someone new trying out ahttps://bitbucket.org/atlassianlabs/bitbucket-client-side-extensions-template.git - none of the PR overview page extensions work.
extensions-pull-request-action-extension-js.js:10 Uncaught ReferenceError: module is not defined
at 2784 (extensions-pull-request-action-extension-js.js:10:12)
at o (bootstrap:19:32)
at extensions-pull-request-action-extension-js.js:13:317
at t (jsonp chunk loading:34:28)
at nonce:1:26
which clicks to
if (module.hot) ...
The default is already false ?
config/webpack.config.js
38: hot: false,
Jira might be related/known. Any workarounds or suggestions to get around this ?
Looks like even if the hot is set to false in webpack config the ClientsideExtensionWebpackPlugin is generating code that still includes hot module replacement logic.
Easiest workaround will be to update plugins in webpack config
plugins: [
...plugins(!isProduction),
clientsideExtensions,
new webpack.DefinePlugin({
'module.hot': 'false',
}),
],
I am looking into this and will update the template repo as well