Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

2.16.0 requires tsconfig.prod.json #322

Closed
lookfirst opened this issue May 15, 2018 · 5 comments
Closed

2.16.0 requires tsconfig.prod.json #322

lookfirst opened this issue May 15, 2018 · 5 comments

Comments

@lookfirst
Copy link

Nothing mentioned in the migration document.

react-scripts-ts build
(node:94) ExperimentalWarning: The fs.promises API is experimental
Creating an optimized production build...
Failed to compile.

Cannot find "/tsconfig.prod.json" file. Please check webpack and ForkTsCheckerWebpackPlugin configuration. 
Possible errors: 
  - wrong `context` directory in webpack configuration (if `tsconfig` is not set or is a relative path in fork plugin configuration)
  - wrong `tsconfig` path in fork plugin configuration (should be a relative or absolute path)
@DorianGrey
Copy link
Collaborator

Sorry for that - I've updated the docs accordingly.

@lookfirst
Copy link
Author

@DorianGrey Thanks for the fast resolution. Why not just modify react-scripts-ts build to generate the file if it doesn't exist?

@DorianGrey
Copy link
Collaborator

DorianGrey commented May 15, 2018

It'd be dead code later on. I've considered this, but then thought it would not be that overwhelming complex to create a new file - at least in case it is documented which and how (which I simply forgot to add to the docs, unluckily).

@BrettKoenig
Copy link

Why is this file needed? Is this a dependency of an npm package the project is using or this project specifically?

@DorianGrey
Copy link
Collaborator

We received some requests to add the ability to use different typescript configurations for development and production mode. This requires different tsconfig files, even though one might extend the other. In the default version provided by the template, the tsconfig.prod.json simply extends tsconfig.json without further changes. However, both might be adopted to more specific use cases if required.

The functionality was added in this PR: #299

sven3270350 added a commit to sven3270350/react-typescript that referenced this issue Aug 11, 2022
OrdinalKing pushed a commit to OrdinalKing/create-react-app-ts-redux-saga-mui that referenced this issue Aug 26, 2022
SmartCodiDev added a commit to SmartCodiDev/redux-saga-mui that referenced this issue May 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants