page 使用 styl写样式,但代码补全与 rpx 转换都无效,请问是配置有问题还是不支持相应配置,谢谢。
wepy.config.js内配置如下:
compilers: {
postcss: {
plugins: [
require('autoprefixer')({
overrideBrowserslist: ['last 2 versions']
}),
require('postcss-pxtorpx-pro')({})
]
},
less: {
compress: prod,
plugins: [
new LessPluginAutoPrefix({ browsers: ['Android >= 2.3', 'Chrome > 20', 'iOS >= 6'] })
]
},
stylus: {
compress: prod,
plugins: [
]
},
sass: {
outputStyle: 'compressed'
},
babel: {
sourceMap: true,
presets: [
'@babel/preset-env'
],
plugins: [
'@wepy/babel-plugin-import-regenerator'
]
}
}
4条答案
按热度按时间lstz6jyr1#
页面 styl 是怎么写的呢?
i86rm4rw2#
PR welcomed
Ref:
https://github.com/jescalan/autoprefixer-stylus
https://github.com/stylus/stylus/blob/dev/docs/js.md#usefn
https://github.com/Tencent/wepy/blob/master/packages/compiler-stylus/index.js#L28
oknrviil3#
我也遇到了 sass也不行
s4chpxco4#
Hi, I would like to work on this issue, I am new here. Can someone explain what needs to be done?
Thanks