Skip to content

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

@Vinayaka-HK

Description

@Vinayaka-HK

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions