b***@qq.com
b***@qq.com
  • 发布:2025-03-25 00:50
  • 更新:2025-03-25 02:27
  • 阅读:1062

【报Bug】新搭建的还是报sass警告,导致打包到40%窗口自动关闭,也没啥错误提示。

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: win11

HBuilderX类型: 正式

HBuilderX版本号: 4.57

手机系统: Android

手机系统版本号: Android 15

手机厂商: 华为

手机机型: 华为

页面类型: vue

vue版本: vue3

打包方式: 云端

项目创建方式: HBuilderX

示例代码:

Please note that in running mode, due to log output, sourcemap, and uncompressed source code, the performance and package size are not as good as release mode.
Vite is compiled on demand, and clicking on an uncompiled page at runtime will compile first and then load, resulting in a slower display, and there is no such problem after release.
Compiler version: 4.56(vue3)
Compiling...
Re-optimizing dependencies because lockfile has changed

vite v5.2.8 dev server running at:

➜ Local: http://localhost:5173/
➜ Network: http://192.168.1.7:5173/
➜ Network: http://172.18.0.1:5173/
➜ Network: http://172.28.48.1:5173/

ready in 1060ms.

Deprecation Warning [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

More info: https://sass-lang.com/d/legacy-js-api

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


16 │ @import "@/uni_modules/vk-uview-ui/theme.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\App.vue 16:9 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


80 │ @import "./uni_modules/vk-uview-ui/index.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\App.vue 80:10 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


2 │ @import "./libs/css/common.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^

src\uni_modules\vk-uview-ui\index.scss 2:9 @import
src\App.vue 80:10 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


3 │ @import "./libs/css/color.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^

src\uni_modules\vk-uview-ui\index.scss 3:9 @import
src\App.vue 80:10 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


7 │ @import "./libs/css/style.vue.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\uni_modules\vk-uview-ui\index.scss 7:9 @import
src\App.vue 80:10 root stylesheet

Warning: 1 repetitive deprecation warnings omitted.

操作步骤:

Please note that in running mode, due to log output, sourcemap, and uncompressed source code, the performance and package size are not as good as release mode.
Vite is compiled on demand, and clicking on an uncompiled page at runtime will compile first and then load, resulting in a slower display, and there is no such problem after release.
Compiler version: 4.56(vue3)
Compiling...
Re-optimizing dependencies because lockfile has changed

vite v5.2.8 dev server running at:

➜ Local: http://localhost:5173/
➜ Network: http://192.168.1.7:5173/
➜ Network: http://172.18.0.1:5173/
➜ Network: http://172.28.48.1:5173/

ready in 1060ms.

Deprecation Warning [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

More info: https://sass-lang.com/d/legacy-js-api

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


16 │ @import "@/uni_modules/vk-uview-ui/theme.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\App.vue 16:9 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


80 │ @import "./uni_modules/vk-uview-ui/index.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\App.vue 80:10 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


2 │ @import "./libs/css/common.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^

src\uni_modules\vk-uview-ui\index.scss 2:9 @import
src\App.vue 80:10 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


3 │ @import "./libs/css/color.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^

src\uni_modules\vk-uview-ui\index.scss 3:9 @import
src\App.vue 80:10 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


7 │ @import "./libs/css/style.vue.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\uni_modules\vk-uview-ui\index.scss 7:9 @import
src\App.vue 80:10 root stylesheet

Warning: 1 repetitive deprecation warnings omitted.

预期结果:

Please note that in running mode, due to log output, sourcemap, and uncompressed source code, the performance and package size are not as good as release mode.
Vite is compiled on demand, and clicking on an uncompiled page at runtime will compile first and then load, resulting in a slower display, and there is no such problem after release.
Compiler version: 4.56(vue3)
Compiling...
Re-optimizing dependencies because lockfile has changed

vite v5.2.8 dev server running at:

➜ Local: http://localhost:5173/
➜ Network: http://192.168.1.7:5173/
➜ Network: http://172.18.0.1:5173/
➜ Network: http://172.28.48.1:5173/

ready in 1060ms.

Deprecation Warning [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

More info: https://sass-lang.com/d/legacy-js-api

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


16 │ @import "@/uni_modules/vk-uview-ui/theme.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\App.vue 16:9 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


80 │ @import "./uni_modules/vk-uview-ui/index.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\App.vue 80:10 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


2 │ @import "./libs/css/common.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^

src\uni_modules\vk-uview-ui\index.scss 2:9 @import
src\App.vue 80:10 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


3 │ @import "./libs/css/color.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^

src\uni_modules\vk-uview-ui\index.scss 3:9 @import
src\App.vue 80:10 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


7 │ @import "./libs/css/style.vue.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\uni_modules\vk-uview-ui\index.scss 7:9 @import
src\App.vue 80:10 root stylesheet

Warning: 1 repetitive deprecation warnings omitted.

实际结果:

Please note that in running mode, due to log output, sourcemap, and uncompressed source code, the performance and package size are not as good as release mode.
Vite is compiled on demand, and clicking on an uncompiled page at runtime will compile first and then load, resulting in a slower display, and there is no such problem after release.
Compiler version: 4.56(vue3)
Compiling...
Re-optimizing dependencies because lockfile has changed

vite v5.2.8 dev server running at:

➜ Local: http://localhost:5173/
➜ Network: http://192.168.1.7:5173/
➜ Network: http://172.18.0.1:5173/
➜ Network: http://172.28.48.1:5173/

ready in 1060ms.

Deprecation Warning [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

More info: https://sass-lang.com/d/legacy-js-api

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


16 │ @import "@/uni_modules/vk-uview-ui/theme.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\App.vue 16:9 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


80 │ @import "./uni_modules/vk-uview-ui/index.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\App.vue 80:10 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


2 │ @import "./libs/css/common.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^

src\uni_modules\vk-uview-ui\index.scss 2:9 @import
src\App.vue 80:10 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


3 │ @import "./libs/css/color.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^

src\uni_modules\vk-uview-ui\index.scss 3:9 @import
src\App.vue 80:10 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


7 │ @import "./libs/css/style.vue.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\uni_modules\vk-uview-ui\index.scss 7:9 @import
src\App.vue 80:10 root stylesheet

Warning: 1 repetitive deprecation warnings omitted.

bug描述:

Please note that in running mode, due to log output, sourcemap, and uncompressed source code, the performance and package size are not as good as release mode.
Vite is compiled on demand, and clicking on an uncompiled page at runtime will compile first and then load, resulting in a slower display, and there is no such problem after release.
Compiler version: 4.56(vue3)
Compiling...
Re-optimizing dependencies because lockfile has changed

vite v5.2.8 dev server running at:

➜ Local: http://localhost:5173/
➜ Network: http://192.168.1.7:5173/
➜ Network: http://172.18.0.1:5173/
➜ Network: http://172.28.48.1:5173/

ready in 1060ms.

Deprecation Warning [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

More info: https://sass-lang.com/d/legacy-js-api

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


16 │ @import "@/uni_modules/vk-uview-ui/theme.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\App.vue 16:9 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


80 │ @import "./uni_modules/vk-uview-ui/index.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\App.vue 80:10 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


2 │ @import "./libs/css/common.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^

src\uni_modules\vk-uview-ui\index.scss 2:9 @import
src\App.vue 80:10 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


3 │ @import "./libs/css/color.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^

src\uni_modules\vk-uview-ui\index.scss 3:9 @import
src\App.vue 80:10 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


7 │ @import "./libs/css/style.vue.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^

src\uni_modules\vk-uview-ui\index.scss 7:9 @import
src\App.vue 80:10 root stylesheet

Warning: 1 repetitive deprecation warnings omitted.

2025-03-25 00:50 负责人:无 分享
已邀请:
DCloud_heavensoft

DCloud_heavensoft

打包前请先真机运行。
我看你选择的vue3,vue3的scss编译器就是dart-saas,需要确保自己的scss代码符合dart-saas语法。
如果你用的三方ui不支持dart-saas,需要找作者适配修改。
vue3下没有回退node-saas的选项。

  • b***@qq.com (作者)

    上周都正常的,一直都正常打包,也没sass警告,这周就更新了下依赖,就一直提示这个,把依赖还原回去,也还是提示sass警告,回不去了。

    2025-03-25 08:58

  • 恭喜n发财

    回复 b***@qq.com: 是这样的,不过升级sass和sassloader可以没有警告,但是会有其他影响,具体是是啥影响不得知,我也不敢升,警告就警告吧,只能等三方去优化了

    2025-03-25 09:03

要回复问题请先登录注册