google/eleventy-high-performance-blog

Mocha as a `dependency`

nucliweb opened this issue · 3 comments

Hello,

I see that the mocha package is as a dependency and I think that is a devDependency, right?

This template does run the tests after every build to ensure the build is good.

Ok, but the tests run in dev or deploy mode. We don't need mocha in the production bundle, so if we move as a devDependency the mocha is available to run in build time because is installed too in the install process.

I know, if we don't import mocha in the code, mocha isn't part of the bundle but is a best practice to add as a dependencies only the packages needed to use in production or if the package is a tool or library.

Nothing from package.json is currently bundled. I see the case of moving 100% of deps into devDepencencies. Feel free to send a PR.