Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Remove require alias #135

Merged
merged 2 commits into from
Apr 26, 2018
Merged

Remove require alias #135

merged 2 commits into from
Apr 26, 2018

Conversation

bnjm
Copy link
Contributor

@bnjm bnjm commented Apr 23, 2018

Scope & Features

This PR removes the require alias's which were introduced as a work-around for the metro bundler, used by React Native, which does not support dynamic require statements as they were used in 3dio-js.

Webpack doesn't allow for any references to require which are not being used for import purposes..leading to the webpack error cannot find module ".": #126

We attempted to get around this by accessing require as global.require however this caused some issues in node.js.

Design

Reverts back to using require as it should be :)

How to test

Webpack:

npm install -g create-react-app
create-react-app require-test
npm install git://github.com/archilogic-com/3dio-js.git#require-fix

Browser & node.js:

Check that the samples in the examples folder are running.

Notes

This will cause an incompatibility for React Native + 3dio.js. I will update my RN compatible fork at https://github.com/bnjm/3dio-js incase there are any affected users.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants