Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

refactor: Add additional check for android before adding android imports #668

Merged
merged 7 commits into from
Sep 25, 2018

Conversation

vtrifonov
Copy link
Contributor

@vtrifonov vtrifonov commented Sep 21, 2018

Add additional check for android before adding the imports, so that the loader can be used in ios platform as well as this allows us to use a single bundle file for both platforms in the playground

@vtrifonov vtrifonov changed the title Add additional check for android before adding android imports refactor: Add additional check for android before adding android imports Sep 21, 2018
not to clash with the application in the app.js file
Copy link
Contributor

@sis0k0 sis0k0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the DefinePlugin to add a global isAndroid variable? That way webpack will be able to remove these imports during build.

@vtrifonov
Copy link
Contributor Author

The thing is that I don't want webpack to remove these imports during the build as I want to produce a bundle valid for both android and ios platforms

@sis0k0
Copy link
Contributor

sis0k0 commented Sep 21, 2018

Discussed in person:
It makes sense to have one version of the bundle.js file for the playground. This allows us to sync only one file to every connected device (iOS or Android). This won't work with platform-specific files (file.android.js, file.ios.js).

@vtrifonov vtrifonov merged commit d3d155d into master Sep 25, 2018
@vtrifonov vtrifonov deleted the trifonov/android-guard branch September 25, 2018 11:21
sis0k0 pushed a commit that referenced this pull request Sep 27, 2018
…rts (#668)

* Add additional check for android before adding android imports
sis0k0 pushed a commit that referenced this pull request Sep 28, 2018
…rts (#668)

* Add additional check for android before adding android imports
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.

3 participants