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

default discord avatar
acemaker008 months ago
3

What am I missing here?



  • default discord avatar
    fofoy.8 months 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
    acemaker008 months 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.8 months ago

    I'm glad you got it sorted !

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

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