miniprogram-custom-component icon indicating copy to clipboard operation
miniprogram-custom-component copied to clipboard

将src中的index.wxss重命名为index.less文件后,无法运行

Open SuperRonin opened this issue 2 years ago • 3 comments

config中已配置less为true

报错提示: Error: File not found with singular glob: D:/mywork/miniprogram-custom-component-master/src/index.wxss (if this was purposeful, use allowEmpty option)

SuperRonin avatar Apr 20 '22 06:04 SuperRonin

已解决,看了下文档,尝试不改文件后缀,在wxss文件中写less语法,编译正常。

SuperRonin avatar Apr 20 '22 06:04 SuperRonin

另外:尝试在index.wxss引入var.wxss, var中定义了很多less变量。但是无法在index.wxss中使用,编译报错。

SuperRonin avatar Apr 20 '22 06:04 SuperRonin

另外:尝试在index.wxss引入var.wxss, var中定义了很多less变量。但是无法在index.wxss中使用,编译报错。

是什么样的报错?能否提供下简单的 demo 呢?

不过如果切换不麻烦的话,其实比较推荐用 https://github.com/wechat-miniprogram/mpflow 来搭建,功能会更加强大噢。

JuneAndGreen avatar Apr 22 '22 03:04 JuneAndGreen