运行到微信小程序,微信小程序启动时,控制台报错?
[ WXSS 文件编译错误]
./app.wxss(4203:1): unexpected token *
(env: Windows,mp,1.06.2504010; lib: 3.10.0)
-
项目中引入了uview-plus、uni-ui库,配置如下:
"easycom": {
"autoscan": true,
"custom": {
"^u-(.)": "uview-plus/components/u-$1/u-$1.vue",
"^up-(.)": "uview-plus/components/u-$1/u-$1.vue",
"^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"
}
} -
uni-scss文件中引入了样式
@import 'uview-plus/theme.scss'; -
main.js引入插件,全部配置如下:
import App from './App'
// 引入uview-plus插件
import uviewPlus from 'uview-plus'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
Vue.use(uviewPlus)
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
app.use(uviewPlus)
return {
app
}
}
// #endif