-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
UMD with 'process.env.NODE_ENV' occurence (dev/prod) #681
Comments
that comes from react-is which is used by hoist-non-react-statics -> https://unpkg.com/react-is@16.7.0/index.js we guard our calls like: https://github.com/i18next/react-i18next/blob/master/src/utils.js#L16 the only thing you can do is adding:
|
Sorry, but I don't get it.
The If react-is does not need the block code inside the Am I missing something ? |
Not working like that...building a module you pull in dependencies...those are commonjs independent of rollup outputting umd in the end -> therefore it ends up like it is. If you like to create a build (hardcoded production and development) like react-is does it - feel free to provide that as a PR...would be highly appreciated |
The pull-request #683 works like a charm for UMD build. EDIT: I have just commit the |
published in react-i18next@9.0.5 |
Hi there.
Describe the bug
Just want to use UMD build of react-i18next, but crashing because of
process.env.NODE_ENV
occurence inside development/production files.Occurs in react-i18next version
https://unpkg.com/react-i18next@9.0.4/dist/umd/react-i18next.js
https://unpkg.com/react-i18next@9.0.4/dist/umd/react-i18next.min.js
To Reproduce
Steps to reproduce the behavior:
To Fix
npm i rollup-plugin-replace -D
rollup.config.js
:rollup-plugin-replace
Thank's.
Gabriel.
The text was updated successfully, but these errors were encountered: