lelandrichardson / react-primitives

Primitive React Interfaces Across Targets
MIT License
3.09k stars 108 forks source link

Ugify error Expo v19.0.0 #83

Open 0xchimz opened 7 years ago

0xchimz commented 7 years ago

Hi, I'm using react-primitives on Expo v19.0.0 while enabling Minify mode (Uglify). I found that react-primitives cause the error:

Error: Uncaught error in the transformer worker: D:\Office\learn\test\node_modules\metro-bundler\build\transformer.js
    at _transform.then.catch.error (D:\Office\learn\test\node_modules\metro-bundler\build\JSTransformer\index.js:147:31)
    at process._tickCallback (internal/process/next_tick.js:109:7)

This error is gone if you disable Minify mode or remove react-primitives.

You can try by using create-react-native-app

  1. require react-primitives in your code.
  2. enable minify mode by edit setting file in ./.expo/settings.json with:
    {
    ...
    "minify": true,
    ...
    }
  3. run yarn start or npm start in your command line to start a project
  4. access a project with your phone or access to bundleUrl directly on your browser
  5. error should display on your command line

This error occurs on both platforms.

ljharb commented 7 years ago

If you figure this out, you can use https://npmjs.com/uglify-register to perform a regression test :-)