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
  • !5827

Set packageName in TypeScript reference file

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/devloco/set-packageName-in-TypeScript-reference-file into master Nov 16, 2018
  • Overview 4
  • Commits 9
  • Pipelines 0
  • Changes 3

Created by: devloco

This PR is sent as suggested by @Timer here: #5811 (closed)

Here are the full steps that I used to test:

  1. I published my react-scripts changes to NPM as @devloco/react-scripts-test
  2. bash prompt at: create-react-app/packages/create-react-app
  3. npm link (to pick up the changes made to createReactApp.js)
  4. cd ~/temp
  5. create-react-app foo1 --typescript --scripts-version @devloco/react-scripts-test
  6. See app creation succeed.
  7. cd foo1/src
  8. vim react-app-env.d.ts
  9. See that "types" prop value is @devloco/react-scripts-test
  10. :q! + ENTER to exit vim
  11. yarn start
  12. See no errors happen. Webpack Dev Server and browser tab launch successfully. Page renders in browser as usual.

Screenshots: pr1 pr2 pr3


Make sure that not using --scripts-version still works the same

  1. cd ~/temp
  2. `create-react-app foo2 --typescript
  3. See app creation succeed.
  4. cd foo2/src
  5. vim react-app-env.d.ts
  6. See that "types" prop value is react-scripts
  7. :q! + ENTER to exit vim
  8. yarn start
  9. See no errors happen. Webpack Dev Server and browser tab launch successfully. Page renders in browser as usual.
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/devloco/set-packageName-in-TypeScript-reference-file