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
When compiling in production, js dependencies that uses typeof expression will output "_typeof" instead and cause the error "_typeof is not a function"
I searched a lot and understand that @babel/preset-env is transforming "typeof" in "_typeof", but if we add "transform-typeof-symbol" to exclude rule, everything should work. But is not working with me.
babel.config.js should contain a lot more than just that.
Someone knows what I'm doing wrong?
environment.loaders.delete('nodeModules'); like in #2131 (comment) will most likely solve your problem. You can read my explanation there for further details 👍.
When compiling in production, js dependencies that uses typeof expression will output "_typeof" instead and cause the error "_typeof is not a function"
I searched a lot and understand that @babel/preset-env is transforming "typeof" in "_typeof", but if we add "transform-typeof-symbol" to exclude rule, everything should work. But is not working with me.
The line of lib that uses typeof is this one: https://github.com/zenorocha/clipboard.js/blob/master/dist/clipboard.js#L516
The output code is:
And my babel.config.js generated by this gem:
Someone knows what I'm doing wrong?
The text was updated successfully, but these errors were encountered: