ttag-org / ttag

:orange_book: simple approach for javascript localization
https://ttag.js.org/
MIT License
345 stars 43 forks source link

process is not defined #161

Closed anilanar closed 5 years ago

anilanar commented 5 years ago

When using node: false option in webpack.config, the following error occurs:

utils.js:243 Uncaught ReferenceError: process is not defined
    at Object../node_modules/ttag/dist/utils.js (utils.js:243)

The line:

var isDebug = !(process && process.env.NODE_ENV === 'production');

When node is false, process doesn't exist but webpack can still replace process.env.NODE_ENV with true/false via webpack.DefinePlugin.

AlexMost commented 5 years ago

@anilanar Thanks for the report! Seems like it's a bug.

AlexMost commented 5 years ago

You can try ttag@1.7.9. This issue should be fixed. Please, let me know if that works for you.