Skip to content

sass import warning #396

@Fukao0129

Description

@Fukao0129

Versions

  • vue-toastification 2.0.0-rc.5
  • vue 3.8
  • nuxt 3.13
  • sass 1.80.5

Describe the bug

I'm trying to override the sass variables.
According to this document, I need to use @import.
But in Vue3, following warning occurs when I build the app.
DEPRECATION WARNING: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

Expected behavior

No warnings

Steps to reproduce

Steps:

  1. Make a scss file.
$vt-color-success: {MY_COLORCODE}
$vt-color-error: {MY_COLORCODE}
@import "vue-toastification/src/scss/_variables";
@import "vue-toastification/src/scss/_toastContainer";
@import "vue-toastification/src/scss/_toast";
@import "vue-toastification/src/scss/_closeButton";
@import "vue-toastification/src/scss/_progressBar";
@import "vue-toastification/src/scss/_icon";
@import "vue-toastification/src/scss/animations/_bounce";
  1. Make a plugin file.
import Toast from "vue-toastification";
import "vue-toastification/dist/index.css";
import "@/assets/style/admin/custom-toast.scss";

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(Toast, {
    containerClassName: "custom-toast-class",
    icon: true,
  });
});
  1. Run npm run dev

Your Environment

  • Device: HP notebook
  • OS: Windows11, Linux, Docker Desktop
  • Browser: Google Chrome

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