szboynono / mosha-vue-toastify

A light weight and fun Vue 3 toast or notification or snack bar or however you wanna call it library.

Home Page:https://szboynono.github.io/mosha-vue-toastify/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error Nuxt 3 on production only

NaosFr opened this issue Β· comments

commented

Hello πŸ‘‹ I have this error on production only after nuxt build && nuxt start on Nuxt 3

"nuxt": "3.0.0-rc.8"
"mosha-vue-toastify": "^1.0.23",
[nuxt] [request error] [unhandled] [500] Named export 'createToast' not found. The requested module 'mosha-vue-toastify' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'mosha-vue-toastify';
const { createToast } = pkg;

Any ideas thx ?

commented

I have the solution:

βœ…

import * as Taost from "mosha-vue-toastify";

❌

import { createToast } from "mosha-vue-toastify";

thank you Nicolas

Is this still an issue for Nuxt 3.0.0 stable?

UPD It is πŸ˜€

@szboynono do you plan to fix it?