{"record":{"id":"f9b7b5205d0e9408","repo":"tailwindlabs/tailwindcss","slug":"the-plugin-detail-path-does-not-accept-option","errorCode":null,"errorMessage":"The plugin \"${detail.path}\" does not accept options","messagePattern":"The plugin \"(.+?)\" does not accept options","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/tailwindcss/src/compat/apply-compat-hooks.ts","lineNumber":265,"sourceCode":"    if (!detail.options) {\n      return {\n        config: { plugins: [detail.plugin] },\n        base: detail.base,\n        reference: detail.reference,\n        src: detail.src,\n      }\n    }\n\n    if ('__isOptionsFunction' in detail.plugin) {\n      return {\n        config: { plugins: [detail.plugin(detail.options)] },\n        base: detail.base,\n        reference: detail.reference,\n        src: detail.src,\n      }\n    }\n\n    throw new Error(`The plugin \"${detail.path}\" does not accept options`)\n  })\n\n  let userConfig = [...pluginConfigs, ...configs]\n\n  let { resolvedConfig } = resolveConfig(designSystem, [\n    { config: createCompatConfig(designSystem.theme), base, reference: true, src: undefined },\n    ...userConfig,\n    { config: { plugins: [darkModePlugin] }, base, reference: true, src: undefined },\n  ])\n  let { resolvedConfig: resolvedUserConfig, replacedThemeKeys } = resolveConfig(\n    designSystem,\n    userConfig,\n  )\n\n  let pluginApiConfig = {\n    designSystem,\n    ast,\n    resolvedConfig,","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/tailwindlabs/tailwindcss/blob/16e94cbf7f965c5ad697e90e940b5e178efad67c/packages/tailwindcss/src/compat/apply-compat-hooks.ts#L247-L283","documentation":"Thrown when resolving plugin details: options were provided for a plugin (`detail.options` is truthy) but the plugin is not an options-function (no `__isOptionsFunction` marker). Plain plugin functions accept no arguments, so passing options is invalid. The plugin path is included for identification.","triggerScenarios":"Writing `@plugin \"./plain-plugin.js\" { someOption: true }` where `plain-plugin.js` exports a bare `function({ addUtilities }) {...}` rather than `plugin.withOptions(...)`. The resolver receives options but the plugin cannot consume them.","commonSituations":"Treating a non-options plugin as if it accepted config; plugin author forgot to wrap with `plugin.withOptions`; mismatch between plugin API and CSS `@plugin` option syntax.","solutions":["Remove the options block from the `@plugin` at-rule — call it as `@plugin \"./plain-plugin.js\";`.","If the plugin should accept options, update it to use `plugin.withOptions((opts) => ({ handler }))` and re-export.","Switch to a JS config file where you can pass options to a properly wrapped plugin."],"exampleFix":"// before\n@plugin \"./plain-plugin.js\" {\n  foo: bar;\n}\n// after\n@plugin \"./plain-plugin.js\";","handlingStrategy":"type-guard","validationCode":"function pluginAcceptsOptions(plugin) {\n  return '__isOptionsFunction' in plugin;\n}\n// if (options && !pluginAcceptsOptions(plugin)) { /* do not pass options */ }","typeGuard":"function isOptionsPlugin(plugin: any): plugin is ((opts: any) => any) & { __isOptionsFunction: true } {\n  return '__isOptionsFunction' in plugin;\n}","tryCatchPattern":null,"preventionTips":["Check for `plugin.withOptions` wrapping before passing options.","Author plugins with `plugin.withOptions` when config is needed via CSS `@plugin`."],"tags":["tailwind","plugin","options","config"],"backgroundTag":null,"analyzedSha":"16e94cbf7f965c5ad697e90e940b5e178efad67c","analyzedAt":"2026-08-12T06:02:42.469Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}