jargons.dev
jargons.dev copied to clipboard
Build: Move `"@types/react-dom"` to `devDependencies`
Currently, "@types/react-dom"
is listed as a dependency in package.json
. To align with good development practices, we should move "@types/react-dom"
to devDependencies
.
Steps:
- Open
package.json
file. - Locate the
"dependencies"
section. - Find the entry for
"@types/react-dom"
and cut it. - Scroll down to the
"devDependencies"
section. - Paste the
"@types/react-dom"
entry under"devDependencies"
. - Save the
package.json
file.
Additional Steps:
- Run
npm install
to update thepackage-lock.json
file with the changes made topackage.json
.
Additional Note:
- Moving
"@types/react-dom"
todevDependencies
ensures that it is only installed in the development environment, reducing the package size in production builds. - This should be easy for sure 😀 , feel free to ask question if you have any challenges following through the steps