You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was playing around with comlink-loader with an isomorphic react app. I used multi and inline options.
For the client bundle, everything works fine, but it failed when bundling the server bundle.
export 'expose' was not found in 'comlink'
After some digging, I found out that it is fixed after I add /^comlink/ to webpack externals. (My webpack externals config is a bit different, I do not use webpack-node-externals)
So, is it expected that comlink only work when externalised? It didn't throw any error on v1 though.
The text was updated successfully, but these errors were encountered:
I haven't had a chance to dig into it yet, but my guess is that this happens due to your bundler ending up choosing the browser version of Comlink rather than the Node version. This is a tricky subject, since bundlers are often configured to prefer "browser" over "main".
I was playing around with
comlink-loader
with an isomorphic react app. I usedmulti
andinline
options.For the client bundle, everything works fine, but it failed when bundling the server bundle.
export 'expose' was not found in 'comlink'
After some digging, I found out that it is fixed after I add
/^comlink/
to webpackexternals
. (My webpackexternals
config is a bit different, I do not usewebpack-node-externals
)So, is it expected that comlink only work when externalised? It didn't throw any error on v1 though.
The text was updated successfully, but these errors were encountered: