Maronato / vue-toastification

Vue notifications made easy!
https://vue-toastification.maronato.dev
MIT License
3.11k stars 140 forks source link

vue-toastification css import doesnt work with bun 1.0 #383

Open Vinayaka-HK opened 1 year ago

Vinayaka-HK commented 1 year ago

Versions

npm@next @2.0 with Vue3

Describe the bug

When running vue-toastification with npm , it works fine, but when running it when bun , it throws an error saying that "vue-toastification/dist/index.css" is not exported from package.json. and the toast wont trigger.

Expected behavior

Toast should trigger as usual.

Steps to reproduce

Reproduction . Steps:

  1. bun install < your-project-name >
  2. normal configuration
import Toast from "vue-toastification";
// Import the CSS or use your own!
import "vue-toastification/dist/index.css";

const app = createApp(...);

const options = {
    // You can set your default options here
};

app.use(Toast, options); 
  1. Run the app.

Here, while running the program using bun run serve the error ERROR in ./src/main.js 12:0-43 - Module not found: Error: Package path ./dist/index.css is not exported from package <package-path>/node_modules/vue-toastification (see exports field in <package-path>/node_modules/vue-toastification/package.json)

Please fix it.

Temporary solution is to copy the css and put it in my assets folder and import it to main.js from there.

gigerIT commented 1 year ago

We have the same issue. The package seems abandoned so there is very little hope that any updates will be released in the future. Best way is to look for alternatives.

IgorHalfeld commented 1 year ago

@gigerIT check this

https://github.com/Maronato/vue-toastification/issues/327#issuecomment-1579870927

alesf commented 12 months ago

I just changed

import "vue-toastification/dist/index.css";

into

import "../../node_modules/vue-toastification/dist/index.css";