facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.68k stars 26.84k forks source link

Typescript template dependencies #9095

Open yonathan06 opened 4 years ago

yonathan06 commented 4 years ago

I saw that using cra with typescript template adds the dev dependencies to the dependencies property in package.json instead of devdepdencies I see it here: packages/cra-template-typescript/template.json

Any reason for that? Is it possible to move it to devdependencies or will it break something?

yonathan06 commented 4 years ago

@JackRKelly If I understand this answer correctly it is ment for module authors, but I believe cra is mostly used for just creating react apps, not for modules. Maybe there should be a different template for creating a react module with typescript. Also, the comment you posted is right for when you create plain typescript modules, but usually you compile your typescript code before publishing to NPM (or any other package manager), so the package it self is usually JS files with types in *.d.ts, for those who use typescript.