Skip to content
GitLab
    • Explore Projects Groups Snippets
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
  • !11031

support for custom tsconfig through TSCONFIG_PROD and TSCONFIG_DEV

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/CarlRibbegaardh/master into main 4 years ago
  • Overview 18
  • Commits 0
  • Pipelines 0
  • Changes 0

Created by: CarlRibbegaardh

I've added 2 environment variables. TSCONFIG_BUILD and TSCONFIG_WATCH. They are used for setting a custom tsconfig in a monorepo setting.

The reason for this is when a tsconfig.json inherits a base tsconfig with all interrnal package folders defined in order to facilitate easy navigation from the outermost projects into components inside library projects, it causes the build process to navigate through the source files instead of the build/dist folders of the library project builds. This is usually solved by updating the tsconfig on the fly before react-scripts build or copying between build and edit mode configs.

I've used env-cmd with the following setting for building.

TSCONFIG_BUILD=tsconfig.build.json
TSCONFIG_WATCH=tsconfig.watch.json

Activity

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply

There are no commits yet.

0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
1
CLA Signed
1
CLA Signed
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
participants
Reference: facebook/create-react-app!11031
Source branch: github/fork/CarlRibbegaardh/master

Menu

Explore Projects Groups Snippets