Unverified Commit 58ab94be authored by Eungyeol's avatar Eungyeol Committed by GitHub

feat(create-next-app): add `@types/react-dom` to TS template (#34623)

* Add @types/react-dom devDependencies

* fix: eslint error

* fix: eslint error 2
parent c9863c87
...@@ -234,7 +234,12 @@ export async function createApp({ ...@@ -234,7 +234,12 @@ export async function createApp({
* TypeScript projects will have type definitions and other devDependencies. * TypeScript projects will have type definitions and other devDependencies.
*/ */
if (typescript) { 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. * Install package.json dependencies if they exist.
......
...@@ -143,6 +143,7 @@ describe('create next app', () => { ...@@ -143,6 +143,7 @@ describe('create next app', () => {
expect(Object.keys(pkgJSON.devDependencies)).toEqual([ expect(Object.keys(pkgJSON.devDependencies)).toEqual([
'@types/node', '@types/node',
'@types/react', '@types/react',
'@types/react-dom',
'eslint', 'eslint',
'eslint-config-next', 'eslint-config-next',
'typescript', 'typescript',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment