Help is on the way! To mark it as solved, use the /solve command. In the meantime, here are some existing threads that may help you:
#Block types not generated
1 messages · Page 1 of 1 (latest)
Block types are not generated. config.ts is in src/blocks/Banner, this is the content of the file```ts
import type { Block } from 'payload'
import {
FixedToolbarFeature,
InlineToolbarFeature,
lexicalEditor,
} from '@payloadcms/richtext-lexical'
export const Banner: Block = {
slug: 'banner',
fields: [
{
name: 'style',
type: 'select',
defaultValue: 'info',
options: [
{ label: 'Info', value: 'info' },
{ label: 'Warning', value: 'warning' },
{ label: 'Error', value: 'error' },
{ label: 'Success', value: 'success' },
],
required: true,
},
{
name: 'content',
type: 'richText',
editor: lexicalEditor({
features: ({ rootFeatures }) => {
return [...rootFeatures, FixedToolbarFeature(), InlineToolbarFeature()]
},
}),
label: false,
required: true,
},
],
interfaceName: 'BannerBlock',
}
"scripts": {
"dev": "next dev",
"build": "BUILD=true next build",
"start": "next start",
"lint": "next lint",
"payload": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload"
},
payload generate:types
maybe this can help you ?
is this specific block included into any collection?
not yet
Ah, ok. I'm slowly bringing the things I need from the website template over to my project as the website template seems to be too complex and interconnected to just rename the posts to news and delete what I don't need
Glad your issue was resolved! :tada: If you want to help make payload better, please give us a :star: on GitHub and review us - It helps us a lot.
🌟 Star Us on GitHub
👍 Review Us