ttag icon indicating copy to clipboard operation
ttag copied to clipboard

ttag development builds broken on react-native using hermes engine since 1.7.28

Open frenberg opened this issue 2 years ago • 1 comments

So I'm not really sure about this one beeing a bug or if I'm doing something wrong here. I was trying to enable hermes engine on my react-native app and it breaks on startup complaining about

ERROR ReferenceError: Property 'webpack_require' doesn't exist, js engine: hermes

So I noticed there was a significant bump of the webpack dependency in 1.7.28 and that changed the ttag.js file completely where it is now a bunch of evals.

My knowledge about webpack is very limited so I don't know how to fix this. Just backing our ttag dependency to 1.7.27 made it work on hermes engine.

Sorry for this less the great description and lack of reproducible code, but just ask if you want me to privde you with some additional info.

If you're familiar with react native just simply init a new project and add ttag. Since hermes is default you dont really need to do anything else but compile and run the app on either ios or android and it will break.

frenberg avatar Jan 23 '24 22:01 frenberg

This issue (https://stackoverflow.com/questions/50358773/webpack-babel-loader-transpiles-code-with-eval) led me to try out a fix. devtool property in webpack config is documented here: https://webpack.js.org/configuration/devtool/#devtool

Tests are passing and it works for me :)

frenberg avatar Jan 24 '24 16:01 frenberg