{"record":{"id":"3ecbecc074a23655","repo":"quasarframework/quasar","slug":"correct-form-my-vite-plugin-name-plugin","errorCode":null,"errorMessage":"Correct form: [ 'my-vite-plugin-name', { /* pluginOpts */ } ] or [ pluginFn, { /* pluginOpts */ } ]","messagePattern":"Correct form: \\[ 'my-vite-plugin-name', (.+?) \\] or \\[ pluginFn, (.+?) \\]","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"app-vite/lib/config-tools.js","lineNumber":77,"sourceCode":"    if (typeof name === 'function') {\n      acc.push(\n        // protect against the Vite plugin mutating its own options and triggering endless cfg diff loop\n        name(merge({}, pluginOpts))\n      )\n      continue\n    }\n\n    if (Object(name) === name) {\n      acc.push(\n        // protect against the Vite plugin mutating its own options and triggering endless cfg diff loop\n        merge({}, name)\n      )\n      continue\n    }\n\n    if (typeof name !== 'string') {\n      warn('quasar.config file > invalid Vite plugin specified: ' + name)\n      warn(\n        \"Correct form: [ 'my-vite-plugin-name', { /* pluginOpts */ } ] or [ pluginFn, { /* pluginOpts */ } ]\"\n      )\n      continue\n    }\n\n    const plugin = await getPackage(name, appDir)\n\n    if (!plugin) {\n      warn(\n        'quasar.config file > invalid Vite plugin specified (cannot find it): ' +\n          name\n      )\n      continue\n    }\n\n    const pluginFn =\n      plugin.default?.default || // example: vite-plugin-checker\n      plugin.default ||","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/config-tools.js#L59-L95","documentation":"This is the companion hint printed immediately after the 'invalid Vite plugin specified' warning (error 118) in parseVitePlugins. It documents the two accepted entry shapes for quasar.config > build > vite.plugins: a plugin-name string, or a plugin function, each optionally paired with an options object inside an array.","triggerScenarios":"Always emitted together with the 'invalid Vite plugin specified: <name>' warning whenever a plugins entry's name is not a string (config-tools.js:77).","commonSituations":"Same as 118: porting plain-Vite plugin objects into quasar.config; nesting mistakes; entries that are neither string nor function.","solutions":["Reshape the entry to `['my-vite-plugin-name', { /* pluginOpts */ }]`.","Or use the function form: `[pluginFn, { /* pluginOpts */ }]` / bare `pluginFn`.","Resolve the accompanying 'invalid Vite plugin specified' warning — fixing that entry removes this hint."],"exampleFix":"// before\nplugins: [{ apply: 'build', ... }]\n// after\nplugins: ['my-plugin', { /* pluginOpts */ }]","handlingStrategy":"validation","validationCode":"// same check as 118; fix the entry shape before running dev/build\nconst shape = e => Array.isArray(e) ? ['name|pluginFn', 'opts'] : typeof e === 'string' ? 'name' : typeof e === 'function' ? 'pluginFn' : 'INVALID';","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Follow the documented shapes exactly: `'name'` or `['name', { pluginOpts }]` or `pluginFn` or `[pluginFn, { pluginOpts }]`.","Treat this hint as the spec for the entry format printed right after warning 118.","Validate quasar.config with dev server startup in CI to catch malformed plugin entries early."],"tags":["quasar-config","vite","plugins","hint"],"backgroundTag":"invalid-vite-plugin-entry","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}