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 DorianGrey force-pushed the tsconfig-prod-version branch from 4fa770b to 3f8b808 Compare April 11, 2018 07:02
@DorianGrey DorianGrey force-pushed the tsconfig-prod-version branch from 3f8b808 to a466da4 Compare April 11, 2018 07:07
@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