Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a full example payload.config.ts #1

Open
hades200082 opened this issue Feb 16, 2024 · 0 comments
Open

Provide a full example payload.config.ts #1

hades200082 opened this issue Feb 16, 2024 · 0 comments

Comments

@hades200082
Copy link

The current example in the readme is not clear to me.

Is the iframeTabsPlugin() something that goes in the plugins section of the config like this:

export default buildConfig({
  admin: {
    user: Users.slug,
    bundler: webpackBundler(),
  },
  editor: slateEditor({}),
  collections: [
    Users,
    Tenants,
    MyCollection
  ],
  typescript: {
    outputFile: path.resolve(__dirname, 'payload-types.ts'),
  },
  graphQL: {
    schemaOutputFile: path.resolve(__dirname, 'generated-schema.graphql'),
  },
  plugins: [
    tenancy(
      { isolationStrategy: "path" }
    ),
   iframeTabsPlugin({ enabled: true, collections: [MyCollection] })
  ],
  db: mongooseAdapter({
    url: process.env.DATABASE_URI,
  }),
})

or does it wrap the entire config like this:

export default iframeTabsPlugin(buildConfig({
  admin: {
    user: Users.slug,
    bundler: webpackBundler(),
  },
  editor: slateEditor({}),
  collections: [
    Users,
    Tenants
  ],
  typescript: {
    outputFile: path.resolve(__dirname, 'payload-types.ts'),
  },
  graphQL: {
    schemaOutputFile: path.resolve(__dirname, 'generated-schema.graphql'),
  },
  plugins: [
    tenancy(
    { isolationStrategy: "path" }
    )
  ],
  db: mongooseAdapter({
    url: process.env.DATABASE_URI,
  }),
}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant