Skip to content

Commit 75eb5b1

Browse files
committed
fix: plugin generator should be optional
close #1896
1 parent 4b4e460 commit 75eb5b1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/@vue/cli/lib/Creator.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,7 @@ module.exports = class Creator extends EventEmitter {
307307
rawPlugins = sortObject(rawPlugins, ['@vue/cli-service'])
308308
const plugins = []
309309
for (const id of Object.keys(rawPlugins)) {
310-
const apply = loadModule(`${id}/generator`, this.context)
311-
if (!apply) {
312-
throw new Error(`Failed to resolve plugin: ${id}`)
313-
}
310+
const apply = loadModule(`${id}/generator`, this.context) || (() => {})
314311
let options = rawPlugins[id] || {}
315312
if (options.prompts) {
316313
const prompts = loadModule(`${id}/prompts`, this.context)

0 commit comments

Comments
 (0)