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.”警告问题,以下是一些解决方案:
-
更新Vite配置文件:您可以在Vite配置文件中设置
api
为"modern"
或"modern-compiler"
来解决这个问题。例如,在vite.config.ts
中添加以下配置:import { defineConfig } from 'vite'; export default defineConf