Renovamen / oh-vue-icons

A Vue component for importing inline SVG icons from different popular icon packs easily.
https://oh-vue-icons.js.org
Other
241 stars 21 forks source link

Deprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0. #42

Open eru123 opened 21 hours ago

eru123 commented 21 hours ago

Got this deprecation warning when building for production

vite v5.4.6 building for production...
transforming (3) node_modules\.pnpm\oh-vue-icons@1.0.0-rc3_vue@3.5.6\node_modules\oh-vue-icons\dist\index.esm.min.jsDeprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

transforming (7) src\components\PublicPage.vueDeprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

transforming (11) src\components\FixedLayout.vueDeprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

transforming (13) src\components\GlobalTable.vueDeprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

transforming (30) src\assets\logo.pngDeprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

transforming (33) src\style.scssDeprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

Deprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

transforming (37) node_modules\.pnpm\core-js@3.38.1\node_modules\core-js\internals\iterators.jsDeprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

Deprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

Deprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

transforming (80) node_modules\.pnpm\oh-vue-icons@1.0.0-rc3_vue@3.5.6\node_modules\oh-vue-icons\icons\fc\index.jsDeprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

transforming (114) node_modules\.pnpm\@vue+devtools-api@6.6.4\node_modules\@vue\devtools-api\lib\esm\const.jsDeprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

transforming (120) node_modules\.pnpm\oh-vue-icons@1.0.0-rc3_vue@3.5.6\node_modules\oh-vue-icons\icons\vi\index.jsDeprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

Deprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

✓ 374 modules transformed.
dist/.vite/manifest.json               1.64 kB │ gzip:  0.42 kB
dist/__/image-selector-C4GOFqCk.png   10.52 kB
dist/__/logo-9A6fZBDn.png             90.15 kB
dist/__/System-Bp0jOYCE.css            3.35 kB │ gzip:  0.93 kB
dist/__/main-3bTRnQWc.css             44.77 kB │ gzip:  6.96 kB
dist/__/Dashboard-rfCxzqEg.js          0.22 kB │ gzip:  0.20 kB
dist/__/Users-CFTY4DBm.js              4.57 kB │ gzip:  1.72 kB
dist/__/System-Dp4mGe6p.js             5.28 kB │ gzip:  1.88 kB
dist/__/Profile-CSmP8NwQ.js           12.45 kB │ gzip:  0.35 kB
dist/__/main-DtEz5WiP.js             167.93 kB │ gzip: 64.07 kB
✓ built in 1m 7s
eru123 commented 21 hours ago

Following this StackOverflow link led me to this temporary fix

//vite.config.ts
export default defineConfig({
  //..other config
  css: {
    preprocessorOptions: {
      scss: {
        silenceDeprecations: ["legacy-js-api"],
      },
    },
  },
})