You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.
The bundler for React Native (https://github.com/facebook/metro-bundler) does not support dynamic require's and as of RN 0.49 throws the error require() must have a single string literal argument if you include 3dio.js in the project.
npm install 3dio import '3dio' in a React Native project.
Result:
Error gets thrown at compilation time require() must have a single string literal argument
Since this was an unexpected breaking change there's a good chance a patch in metro-bundler will be released (facebook/metro#65), however from the discussion it also seems like there are valid reasons not to support dynamic requires
The text was updated successfully, but these errors were encountered:
The bundler for React Native (https://github.com/facebook/metro-bundler) does not support dynamic
require
's and as of RN 0.49 throws the errorrequire() must have a single string literal argument
if you include 3dio.js in the project.This caused a problem for other libraries like moment.js ( facebook/react-native#16216), resulting in a PR to alias
require
as a work around (moment/moment#4187)Environment
React Native 0.49.0-rc.6
metro-bundler 0.13.0
3dio.js 1.x.x
How to reproduce:
npm install 3dio
import '3dio'
in a React Native project.Result:
Error gets thrown at compilation time
require() must have a single string literal argument
Since this was an unexpected breaking change there's a good chance a patch in metro-bundler will be released (facebook/metro#65), however from the discussion it also seems like there are valid reasons not to support dynamic
require
sThe text was updated successfully, but these errors were encountered: