Sp-dev-docs: 馃悶TS type declaration packages should be in devDependencies, not dependencies

Created on 18 Jul 2018  路  4Comments  路  Source: SharePoint/sp-dev-docs

Category

  • [x] Question
  • [ ] Typo
  • [ ] Bug
  • [ ] Additional article idea

Expected or Desired Behavior

NPM packages that are not needed for production & only for development, such as TypeScript type declaration files, should only be in the devDependencies section of package.json within a Node.js project. This means the following two packages should be in devDependencies:

  • @types/webpack-env
  • @types/es6-promise

Observed Behavior

The two packages listed above are in the dependencies section of package.json

Steps to Reproduce

Create a SPFx project with v1.5.1 and look at the package.json file

tooling fixed-next-drop tracked bug-confirmed

Most helpful comment

Thanks for the feedback. This is not urgent but we have added it to our backlog.

All 4 comments

Thanks for the feedback. This is not urgent but we have added it to our backlog.

Yup... not urgent as it doesn't impact anything, just making things more correct. Accept PR's to the generator and I'll submit the fix ;)

BTW... same comment for React-based projects too. The two React @types/* packages should also be moved => devDependencies

The fix will be included into the next @microsoft/generator-sharepoint version.

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

Was this page helpful?
0 / 5 - 0 ratings