Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

taro4.0.7 Vue3+TS+Vite 定制主题报错-sass高于1.80.0报错 #3227

Open
wuxingtao opened this issue Nov 27, 2024 · 1 comment
Open

taro4.0.7 Vue3+TS+Vite 定制主题报错-sass高于1.80.0报错 #3227

wuxingtao opened this issue Nov 27, 2024 · 1 comment

Comments

@wuxingtao
Copy link

wuxingtao commented Nov 27, 2024

NutUI 包名

@nutui/nutui-taro

NutUI 版本号

4.3.13

平台

weapp

sass依赖版本

├─ @nutui/[email protected]
│ └─ [email protected]
├─ @types/[email protected]
│ └─ [email protected]
├─ [email protected]

重现链接

重现步骤

sass: {
  resource: [
    path.resolve(__dirname, '..', 'src/styles/custom_theme.scss')
  ],
  // 默认京东 APP 10.0主题 > @import "@nutui/nutui-taro/dist/styles/variables.scss";
  // 京东科技主题 > @import "@nutui/nutui-taro/dist/styles/variables-jdt.scss";
  // 京东B商城主题 > @import "@nutui/nutui-taro/dist/styles/variables-jdb.scss";
  // 京东企业业务主题 > @import "@nutui/nutui-taro/dist/styles/variables-jddkh.scss";
  data: `@import "@nutui/nutui-taro/dist/styles/variables.scss";`
},

image

期望的结果是什么?

主题scss配置正常生效

实际的结果是什么?

ModuleWarning: Module Warning (from ./node_modules/sass-loader/dist/cjs.js):
主题配置无法正常生效

环境信息

Taro CLI 4.0.7 environment info:
System:
OS: Windows 11 10.0.22621
CPU: (20) x64 13th Gen Intel(R) Core(TM) i7-13700H
Memory: 10.54 GB / 31.73 GB
Binaries:
Node: 18.20.4 - D:\work\nvm\nodejs\node.EXE
Yarn: 1.22.22 - D:\work\nvm\nodejs\yarn.CMD
npm: 10.7.0 - D:\work\nvm\nodejs\npm.CMD
npmPackages:
@tarojs/cli: 4.0.7 => 4.0.7
@tarojs/components: 4.0.7 => 4.0.7
@tarojs/helper: 4.0.7 => 4.0.7
@tarojs/plugin-framework-vue3: 4.0.7 => 4.0.7
@tarojs/plugin-html: 4.0.7 => 4.0.7
@tarojs/plugin-platform-alipay: 4.0.7 => 4.0.7
@tarojs/plugin-platform-h5: 4.0.7 => 4.0.7
@tarojs/plugin-platform-jd: 4.0.7 => 4.0.7
@tarojs/plugin-platform-qq: 4.0.7 => 4.0.7
@tarojs/plugin-platform-swan: 4.0.7 => 4.0.7
@tarojs/plugin-platform-tt: 4.0.7 => 4.0.7
@tarojs/plugin-platform-weapp: 4.0.7 => 4.0.7
@tarojs/runtime: 4.0.7 => 4.0.7
@tarojs/shared: 4.0.7 => 4.0.7
@tarojs/taro: 4.0.7 => 4.0.7
@tarojs/taro-loader: 4.0.7 => 4.0.7
@tarojs/webpack5-runner: 4.0.7 => 4.0.7
babel-preset-taro: 4.0.7 => 4.0.7
eslint-config-taro: 4.0.7 => 4.0.7

其他补充信息

vue: 3.5.13
node: v18.20.4

@wuxingtao
Copy link
Author

wuxingtao commented Nov 27, 2024

sass降级到[email protected]是可以的成功运行的。

sass版本高于1.80版本了
├─ @types/[email protected]
├─ [email protected]
└─ [email protected]

@wuxingtao wuxingtao changed the title taro4.0.7 Vue3+TS+Vite 定制主题报错-sass-loader报错 taro4.0.7 Vue3+TS+Vite 定制主题报错-sass高于1.80.0报错 Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant