Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to a single index.js entry point #1421

Closed
whimsicaldreamer opened this issue Oct 7, 2017 · 5 comments
Closed

Move to a single index.js entry point #1421

whimsicaldreamer opened this issue Oct 7, 2017 · 5 comments

Comments

@whimsicaldreamer
Copy link

whimsicaldreamer commented Oct 7, 2017

React-native has moved the entry points for android and ios to a single index.js entry point. But using the extension for react-native-windows I am still getting index.windows.js in my project folder. Any views on it?

The changes to react-native are here: facebook/react-native#15312

@rozele
Copy link
Collaborator

rozele commented Oct 9, 2017

Thanks @whimsicaldreamer. I'll take a look at this.

rozele added a commit to rozele/react-native-windows that referenced this issue Oct 9, 2017
RN v0.49 switched to a single entry point template. This change leverages this single entry point and overrides the App.js template instead.

Fixes microsoft#1421
rozele added a commit that referenced this issue Oct 9, 2017
RN v0.49 switched to a single entry point template. This change leverages this single entry point and overrides the App.js template instead.

Fixes #1421
rozele added a commit to rozele/react-native-windows that referenced this issue Oct 9, 2017
…osoft#1423)

RN v0.49 switched to a single entry point template. This change leverages this single entry point and overrides the App.js template instead.

Fixes microsoft#1421
@whimsicaldreamer
Copy link
Author

Thanks for the speedy changes. How do I update my project to use the changes?

@rozele
Copy link
Collaborator

rozele commented Oct 9, 2017

@whimsicaldreamer easiest way to do this would be to just trash your current react-native-windows project.

cd myapp
rd /s /q windows
del index.windows.js

And then re-run react-native windows to regenerate the project template. Unfortunately this means you'll have to re-link your native plugins if you've done any of that. We need to support something like react-native-git-upgrade better (see #1358)

@whimsicaldreamer
Copy link
Author

@rozele, I re-ran react-native windows and it produced the single entry point perfectly but can we remove the App.windows.js file so that we can use the App.js file for all three platforms. Looking at the current index.js, it isn't importing App.windows.js' but only App.js`. Pardon me if my question is naive as I am new to react-native.

Kudo pushed a commit to cloudmosa/react-native-windows that referenced this issue Oct 20, 2017
…osoft#1423)

RN v0.49 switched to a single entry point template. This change leverages this single entry point and overrides the App.js template instead.

Fixes microsoft#1421
(cherry picked from commit e0cea0b)
@jpshelley
Copy link

Should this issue be re-opened? I just created a fresh project and there is still a App.windows.js file along with a App.js file? I understand that is different from the index - but would it make sense to consolidate the App file too?

MikeHillberg added a commit to MikeHillberg/react-native-windows that referenced this issue Dec 13, 2018
Per microsoft#1421, rename index.windows.js to index.js in the react-native bundle command line.
rozele pushed a commit that referenced this issue Jan 2, 2019
Per #1421, rename index.windows.js to index.js in the react-native bundle command line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants