We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
cliServiceVersion
1 parent ea91df2 commit aafc83fCopy full SHA for aafc83f
packages/@vue/cli/lib/GeneratorAPI.js
@@ -96,6 +96,13 @@ class GeneratorAPI {
96
}
97
98
get cliServiceVersion () {
99
+ // In generator unit tests, we don't write the actual file back to the disk.
100
+ // So there is no cli-service module to load.
101
+ // In that case, just return the cli version.
102
+ if (process.env.VUE_CLI_TEST && process.env.VUE_CLI_SKIP_WRITE) {
103
+ return this.cliVersion
104
+ }
105
+
106
const servicePkg = loadModule(
107
'@vue/cli-service/package.json',
108
this.generator.context
0 commit comments