Skip to content

Commit

Permalink
feat(create-next-app): add @types/react-dom to TS template (#34623)
Browse files Browse the repository at this point in the history
* Add @types/react-dom devDependencies

* fix: eslint error

* fix: eslint error 2
  • Loading branch information
eungyeole committed Feb 24, 2022
1 parent c9863c8 commit 58ab94b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/create-next-app/create-app.ts
Expand Up @@ -234,7 +234,12 @@ export async function createApp({
* TypeScript projects will have type definitions and other devDependencies.
*/
if (typescript) {
devDependencies.push('typescript', '@types/react', '@types/node')
devDependencies.push(
'typescript',
'@types/react',
'@types/node',
'@types/react-dom'
)
}
/**
* Install package.json dependencies if they exist.
Expand Down
1 change: 1 addition & 0 deletions test/integration/create-next-app/index.test.js
Expand Up @@ -143,6 +143,7 @@ describe('create next app', () => {
expect(Object.keys(pkgJSON.devDependencies)).toEqual([
'@types/node',
'@types/react',
'@types/react-dom',
'eslint',
'eslint-config-next',
'typescript',
Expand Down

0 comments on commit 58ab94b

Please sign in to comment.