[0.3.2] window is not defined
gpoitch opened this issue · 7 comments
I know this is only meant to be used in a browser, but it's convenient when running tests that this package can be safely imported.
Since upgrading from 0.3.1 -> 0.3.2, I get a window is not defined
error coming from this package. It looks to be from the bundling code. Might have to configure webpack to use libraryTarget: "umd"
?
I did change the webpack config in 0.3.2. Do you have a sample repo I can test against?
Thanks for looking. No I don't have an accessible repo. I can just PR a fix when I get a moment.
I just pushed a beta for 0.3.3
to NPM, let me know if that fixes it and I'll cut a proper release.
Same issue in 0.3.3-0
I have to admit I don't know what's going on, then. Happy to dig in more if you can send me a minimal reproduction, or a PR when you have a chance.
Here is a failing test: https://github.com/joshfrench/react-mobiledoc-editor/compare/master...gpoitch:umd-fail?expand=1
Looks like a new issue with webpack: webpack/webpack#6784
Thanks for digging! I'll get a patch out and hold off on webpack 4 until that's fixed.