Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !2520

Multicompilation of indexXX.js files to indexXX.html outputs

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/plievone/multicompiler into master Jun 11, 2017
  • Overview 2
  • Commits 1
  • Pipelines 0
  • Changes 4

Created by: plievone

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.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/plievone/multicompiler