From 0d36a44c17341074981445279a58a2127558b115 Mon Sep 17 00:00:00 2001 From: koppt Date: Thu, 26 Sep 2024 17:29:43 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=B0=83=E6=95=B4=20Dart=20Sass=20?= =?UTF-8?q?=E7=9A=84=20warnings=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/taro-webpack5-runner/src/webpack/WebpackModule.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/taro-webpack5-runner/src/webpack/WebpackModule.ts b/packages/taro-webpack5-runner/src/webpack/WebpackModule.ts index a4d59878acd1..42fda8264590 100644 --- a/packages/taro-webpack5-runner/src/webpack/WebpackModule.ts +++ b/packages/taro-webpack5-runner/src/webpack/WebpackModule.ts @@ -104,6 +104,8 @@ export class WebpackModule { implementation: require('sass'), sassOptions: { outputStyle: 'expanded', + // https://github.com/sass/dart-sass/blob/main/CHANGELOG.md#js-api + silenceDeprecations: ['legacy-js-api'], importer (url, prev, done) { // 让 sass 文件里的 @import 能解析小程序原生样式文体,如 @import "a.wxss"; const extname = path.extname(url)