{"id":440,"hash":"b339b851a0d6f764b0c054bf00fb278fc51388e015dc3e389f6ef998210f3512","pattern":"The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0","full_message":"I was using create-react-app before and now I switched the same project to vite and everything working fine except I am getting a warning log as follows\n\nDeprecation [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.\n\nI want to get rid of these warnings from log while development and build the application. Following are my dependencies\n\n{\n  \"dependencies\": {\n    \"@heroicons/react\": \"^2.1.5\",\n    \"@tanstack/react-table\": \"^8.17.3\",\n    \"i18next\": \"^23.12.1\",\n    \"i18next-browser-languagedetector\": \"^8.0.0\",\n    \"react\": \"^18.3.1\",\n    \"react-dom\": \"^18.3.1\",\n    \"react-i18next\": \"^14.1.3\",\n    \"react-indiana-drag-scroll\": \"^2.2.0\",\n    \"react-toastify\": \"^10.0.5\",\n    \"recharts\": \"^2.13.0-alpha.4\",\n    \"recoil\": \"^0.7.7\",\n    \"sass\": \"^1.79.1\",\n    \"uuid\": \"^10.0.0\"\n  }\n}\n\nNode version is v22.7.0","ecosystem":"npm","package_name":"vite","package_version":null,"solution":"The default API when using Vite is currently set to legacy, but you can change it in your vite.config.[js/ts].\n\nexport default defineConfig({\n  css: {\n    preprocessorOptions: {\n      scss: {\n        api: 'modern-compiler' // or \"modern\"\n      }\n    }\n  }\n})\n\nReference: https://vitejs.dev/config/shared-options#css-preprocessoroptions","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/78997907/the-legacy-js-api-is-deprecated-and-will-be-removed-in-dart-sass-2-0-0","votes":96,"created_at":"2026-04-19T04:51:09.958056+00:00","updated_at":"2026-04-19T04:51:09.958056+00:00"}