I'm getting a "seoPlugin is not a function" error?

default discord avatar
acemaker00
4 weeks ago
3

What am I missing here?



  • default discord avatar
    fofoy.
    4 weeks ago

    Your import should be

    import seo from '@payloadcms/plugin-seo';


    And then replace

    seoPlugin

    by

    seo

    when you define config as well

  • default discord avatar
    acemaker00
    4 weeks ago

    I can't use ES6 though. Shouldn't this be the same thing?



    Found a solution...



    const seoPluginModule = require("@payloadcms/plugin-seo"); const seoPlugin = seoPluginModule.default;


    Thanks for your help @fofoy!

  • default discord avatar
    fofoy.
    4 weeks ago

    I'm glad you got it sorted !

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.