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

Allow using different tsconfig files for dev and build #299

Merged
merged 1 commit into from
May 9, 2018

Conversation

DorianGrey
Copy link
Collaborator

This PR adds the ability to use different configurations for dev and build mode for the typescript transpilation process.
Without further changes to the new tsconfig.build.json, the behavior will not change in any way, since it's just a no-op extension of the main tsconfig.json.

@wmonk
Copy link
Owner

wmonk commented Apr 9, 2018

Looks good! Do you think build is a clear enough name for this file? Possibly tsconfig.prod.json?

@DorianGrey
Copy link
Collaborator Author

DorianGrey commented Apr 9, 2018

Have to admit that I'm still thinking about this -

  • build closely refers to the task it is used by
  • prod primarily refers to the config version it is referenced by

So both makes sense. 🤔

@DorianGrey
Copy link
Collaborator Author

OK, decided to go with prod instead of build. Makes somewhat more sense in this case.

@mbrowne
Copy link

mbrowne commented Jun 13, 2018

I was copying this PR into my app which was ejected, and I noticed that this line of webpack.config.prod.js was left unmodified:

new TsconfigPathsPlugin({ configFile: paths.appTsConfig })

I think maybe that should be changed to paths.appTsProdConfig also?

@DorianGrey
Copy link
Collaborator Author

DorianGrey commented Jun 13, 2018

Yes, there is already a PR for this change: https://github.com/wmonk/create-react-app-typescript/pull/323/files
It somehow got lost when creating and merging this PR. Just merged it,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants