bencodezen / vue-enterprise-boilerplate

An ever-evolving, very opinionated architecture and dev environment for new Vue SPA projects using Vue CLI.
7.78k stars 1.32k forks source link

Question: How are you able to use `jest` and `webpack` without explicitly defining them as devDependencies? #22

Closed dannyrb closed 6 years ago

dannyrb commented 6 years ago

I'm pretty sure you have access to webpack via the vue-cli-service: https://github.com/chrisvfritz/vue-enterprise-boilerplate/blob/master/package.json#L6

But I'm less sure about jest: https://github.com/chrisvfritz/vue-enterprise-boilerplate/blob/master/package.json#L12

Do you rely on it being installed globally? If so, why that choice? If not, what black magic is taking place here? (:

radum commented 6 years ago

@dannyrb https://github.com/chrisvfritz/vue-enterprise-boilerplate/blob/master/package.json#L46

dannyrb commented 6 years ago

@radum is there anything else going on? When I add that to my own project's package.json, I receive a:

'jest' is not recognized as an internal or external command

The readme for that package is here: https://www.npmjs.com/package/@vue/cli-plugin-unit-jest

It recommends using: vue-cli-service test [options] <regexForTestFiles>

Which works for me, but jest does not.

dannyrb commented 6 years ago

It looks like my issue was stemming from not having invoked the plugin on an existing project. Thanks for your help, @radum!