diff --git a/packages/taro-webpack5-runner/src/webpack/WebpackModule.ts b/packages/taro-webpack5-runner/src/webpack/WebpackModule.ts index a4d59878acd..42fda826459 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)