Search code examples
vue.jsvuejs3storybookquasar-frameworkquasar

Using Quasar Notify plugin in Storybook mdx file (Quasar v2, Storybook, Vue3)


I'm having some issues with the Notify plugin from Quasar. I have already defined the plugin in quasar.config.js and made the necessary imports according to the Quasar documentation. However, I am still facing the error of $q.notify being undefined in the .mdx story file. In Quasar V1, the error was not generated and the code works fine. Thanks in advance!


Solution

  • For anyone interested, I solved it by adding the following in the storybook preview.js file:

    app.use(Quasar, {
      plugins: {
        Notify,
      },
      config: {
        notify:{},
      },
    }