quasarframework/quasar · info
Correct form: [ 'my-vite-plugin-name', { /* pluginOpts */ }
Error message
Correct form: [ 'my-vite-plugin-name', { /* pluginOpts */ } ] or [ pluginFn, { /* pluginOpts */ } ] What it means
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.
Source
Thrown at app-vite/lib/config-tools.js:77
if (typeof name === 'function') {
acc.push(
// protect against the Vite plugin mutating its own options and triggering endless cfg diff loop
name(merge({}, pluginOpts))
)
continue
}
if (Object(name) === name) {
acc.push(
// protect against the Vite plugin mutating its own options and triggering endless cfg diff loop
merge({}, name)
)
continue
}
if (typeof name !== 'string') {
warn('quasar.config file > invalid Vite plugin specified: ' + name)
warn(
"Correct form: [ 'my-vite-plugin-name', { /* pluginOpts */ } ] or [ pluginFn, { /* pluginOpts */ } ]"
)
continue
}
const plugin = await getPackage(name, appDir)
if (!plugin) {
warn(
'quasar.config file > invalid Vite plugin specified (cannot find it): ' +
name
)
continue
}
const pluginFn =
plugin.default?.default || // example: vite-plugin-checker
plugin.default ||View on GitHub (pinned to 4841521b5f)
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.
Example fix
// before
plugins: [{ apply: 'build', ... }]
// after
plugins: ['my-plugin', { /* pluginOpts */ }] Defensive patterns
Strategy: validation
Validate before calling
// same check as 118; fix the entry shape before running dev/build const shape = e => Array.isArray(e) ? ['name|pluginFn', 'opts'] : typeof e === 'string' ? 'name' : typeof e === 'function' ? 'pluginFn' : 'INVALID';
Prevention
- 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.
When it happens
Trigger: 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).
Common situations: Same as 118: porting plain-Vite plugin objects into quasar.config; nesting mistakes; entries that are neither string nor function.
Related errors
- quasar.config file > invalid Vite plugin specified: ${name}
- The queued task for "${task.diffName}" failed
- Applying the quasar.config changes failed
- Unknown network error occurred
- Could not compile the quasar.config file because it has erro
AI-assisted analysis of quasarframework/quasar@4841521b5f (2026-08-30).
Data as JSON: /api/errors/3ecbecc074a23655.
Report an issue: GitHub.