You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
taro-ui版本:3.0.0-alpha.3
启动报错 "SassError: @use rules must be written before any other rules."
复现步骤
taro-ui版本:3.0.0-alpha.3
按需引入 import 'taro-ui/dist/style/components/toast.scss'
2.启动报错 "SassError: @use rules must be written before any other rules."
3.删掉dist中的 toast.scss 文件下的 @use "sass:math"; 恢复正常
复现代码
import { Component } from 'react'
import { Block, View, Text, Image, Button } from '@tarojs/components'
import Taro, { getCurrentInstance } from '@tarojs/taro'
import {
AtToast,
AtModal,
AtModalContent,
AtModalAction,
AtModalHeader
} from 'taro-ui'
import 'taro-ui/dist/style/components/toast.scss'
...
报错信息
./node_modules/taro-ui/dist/style/components/toast.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: @use rules must be written before any other rules.
Taro UI 版本信息
v3.0.0-alpha.3
问题描述
taro-ui版本:3.0.0-alpha.3
启动报错 "SassError: @use rules must be written before any other rules."
复现步骤
taro-ui版本:3.0.0-alpha.3
2.启动报错 "SassError: @use rules must be written before any other rules."
3.删掉dist中的 toast.scss 文件下的 @use "sass:math"; 恢复正常
复现代码
import { Component } from 'react'
import { Block, View, Text, Image, Button } from '@tarojs/components'
import Taro, { getCurrentInstance } from '@tarojs/taro'
import {
AtToast,
AtModal,
AtModalContent,
AtModalAction,
AtModalHeader
} from 'taro-ui'
import 'taro-ui/dist/style/components/toast.scss'
...
报错信息
./node_modules/taro-ui/dist/style/components/toast.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: @use rules must be written before any other rules.
系统信息
👽 Taro v3.3.18
Taro CLI 3.3.18 environment info:
System:
OS: macOS 13.5.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 14.6.0 - ~/.nvm/versions/node/v14.6.0/bin/node
npm: 6.14.6 - ~/.nvm/versions/node/v14.6.0/bin/npm
npmPackages:
@tarojs/cli: 3.3.18 => 3.3.18
@tarojs/components: 3.3.18 => 3.3.18
@tarojs/mini-runner: 3.3.18 => 3.3.18
@tarojs/react: 3.3.18 => 3.3.18
@tarojs/runtime: 3.3.18 => 3.3.18
@tarojs/taro: 3.3.18 => 3.3.18
@tarojs/webpack-runner: 3.3.18 => 3.3.18
babel-preset-taro: 3.3.18 => 3.3.18
eslint-config-taro: ^3.6.2 => 3.6.29
eslint-plugin-taro: ^3.3.20 => 3.3.20
react: ^17.0.0 => 17.0.2
taro-ui: ^3.0.0-alpha.3 => 3.3.0
补充信息
The text was updated successfully, but these errors were encountered: