-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webpack / UglifyJS bundling process issue #140
Comments
Apparently this package's usage has already been called out within stringify-object's issues as well |
have you tried uglify-es: |
I could perhaps use another minifier if I use the full control mode of storybook but at this time the minifier is baked in to their build target. |
This is the right answer to this current issue, you could maybe contribute to storybook default minifier and use uglify-es as stated here: https://github.com/mishoo/UglifyJS2#note Other relevant links: I am sorry this happens but stringify-object may have take this decision (of not building anymore for ES5) a bit too early. OR uglifyjs may have waited too long to implement changes to support ES6. Either way, you have solution to fix this I believe in the post you saw. Thanks a lot for contributing here! |
Thanks for the utility, it is/was working great!
I am utilizing it in a custom addon for react-storybook. Until I upgraded react-storybook to their webpack 2 update it seemed to be working fine. But I am having an issue now with webpack/babel/uglify build of react-storybook processing this package. Digging into it this may not be an issue with react-element-to-jsx-string but really its stringify-object dependency.
sindresorhus/stringify-object#35
It seems that the compiled version was not intended for browser usages and it's compiled file is shipped containing arrow functions that will break within uglify since it won't process ES2015.
Is anyone else experiencing browser usage issues? I tried processing stringify-object with babel as part of the build but to no avail. Being that it is a dependency of a dependency I am not sure that the end user would be responsible or aware of how to use this properly...
Any ideas, suggestions, or solutions would be appreciated.
Thanks again!
The text was updated successfully, but these errors were encountered: