fite-plugin-autoprefixer/index.js

20 lines
411 B
JavaScript

/**
* {}
* @author yutent<yutent.io@gmail.com>
* @date 2024/07/25 16:39:23
*/
import autoprefixer from 'autoprefixer'
import postcss from 'postcss'
export default function (browers = 'chrome 89, safari 13.1') {
return function (ext, data) {
if (ext === 'css') {
return postcss([autoprefixer(browers)])
.process(data, { from: '' })
.then(r => r.css)
}
return data
}
}
fite构建工具专用的css前缀补全插件.
JavaScript 100%