{"record":{"id":"d2ba1ca7ca370209","repo":"parcel-bundler/parcel","slug":"no-preprocessor-found-for-block-type-type","errorCode":null,"errorMessage":"No preprocessor found for block type ${type}","messagePattern":"No preprocessor found for block type (.+?)","errorType":"exception","errorClass":"ThrowableDiagnostic","httpStatus":null,"severity":"error","filePath":"packages/transformers/vue/src/VueTransformer.js","lineNumber":439,"sourceCode":"  });\n};`\n    : ''\n}\nexport default cssModules;`,\n        });\n      }\n      return assets;\n    }\n    case 'custom': {\n      let toCall = [];\n      // To satisfy flow\n      if (!config) return [];\n      let types = new Set();\n      for (let block of customBlocks) {\n        let {type, src, content, attrs} = block;\n        if (!config.customBlocks[type]) {\n          // TODO: codeframe\n          throw new ThrowableDiagnostic({\n            diagnostic: {\n              message: md`No preprocessor found for block type ${type}`,\n              origin: '@parcel/transformer-vue',\n            },\n          });\n        }\n        if (src) {\n          content = (\n            await options.inputFS.readFile(await resolve(asset.filePath, src))\n          ).toString();\n        }\n        toCall.push([type, content, attrs]);\n        types.add(type);\n      }\n      return [\n        {\n          type: 'js',\n          uniqueKey: asset.id + '-custom',","sourceCodeStart":421,"sourceCodeEnd":457,"githubUrl":"https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/transformers/vue/src/VueTransformer.js#L421-L457","documentation":"Thrown by @parcel/transformer-vue when a custom block (<template lang=\"xxx\" block> or a top-level custom block tag of the given type) has no matching handler registered in vue.config.js customBlocks. The transformer iterates customBlocks and looks up config.customBlocks[type]; absence is fatal.","triggerScenarios":"An SFC contains a custom block (e.g. <docs>, <i18n>, <story>) whose type is not a key in the customBlocks object returned from vue.config.js.","commonSituations":"Adding a documentation/i18n block without registering its processor in vue.config.js, removing a customBlocks entry while SFCs still use the block, or a typo in the block tag name.","solutions":["Register the block type in vue.config.js: `module.exports = { customBlocks: { docs: { preprocess: ... } } }`.","Remove the custom block from the SFC if it is no longer needed.","Fix the typo so the block tag matches a registered customBlocks key."],"exampleFix":"// before (vue.config.js)\nmodule.exports = { customBlocks: {} };\n// SFC: <docs>some doc</docs>\n// after\nmodule.exports = { customBlocks: { docs: { preprocess: 'text' } } };","handlingStrategy":"validation","validationCode":"const registered = Object.keys(config?.customBlocks || {});\nconst used = customBlocks.map(b => b.type);\nconst missing = used.filter(t => !registered.includes(t));\nif (missing.length) throw new Error('Unregistered custom block types: ' + missing.join(', '));","typeGuard":"function allCustomBlocksRegistered(customBlocks, config) {\n  const registered = new Set(Object.keys(config?.customBlocks || {}));\n  return customBlocks.every(b => registered.has(b.type));\n}","tryCatchPattern":null,"preventionTips":["Register every custom block type (docs, i18n, story) in vue.config.js customBlocks.","When removing a customBlocks handler, also strip those blocks from SFCs.","Keep the block tag name exactly matching the config key."],"tags":["vue","custom-blocks","config","parcel-transformer"],"backgroundTag":null,"analyzedSha":"59484858a1a0bcbb71f74088956bb437a2db6505","analyzedAt":"2026-08-13T04:06:35.925Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}