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

Multicompilation of indexXX.js files to indexXX.html outputs #2520

Closed
wants to merge 1 commit into from

Conversation

plievone
Copy link

@plievone plievone commented Jun 11, 2017

Hi, consider this as a WIP / discussion opener / proof-of-concept of sorts related to #1084.
With this, it is quite easy to add multiple .html outputs when needed:

  • src/index.js results in index.html and accompanied bundles in build/
  • src/indexXX.js results in indexXX.html and accompanied bundles in build/

Verified by copying packages/react-scripts/template/src/index.js to index2.js with modifications and seeing that both yarn start and yarn build succeeded and both http://localhost:3000/ and http://localhost:3000/index2.html work and hot-reload ok, but there may well be edge cases (such as advanced configuration and router usage) so please don't merge until polished by a knowledgeable create-react-app person.

It might be better to output pages (such as src/pages/indexname/index.js or src/pages/indexname.js) to separate subdirectories (such as build/indexname/index.html), but that may necessitate larger changes in build scripts than this minimal diff.

@plievone
Copy link
Author

plievone commented Jun 12, 2017

CI failing seems unrelated to this pull request. On Travis, not enough disk space, on Appveyor, the flow server is not responding.

@Timer
Copy link
Contributor

Timer commented Sep 26, 2018

Thanks for this, but we're not exploring multi compilations at this time.

@Timer Timer closed this Sep 26, 2018
@lock lock bot locked and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants