fix: postcss-comment

This commit is contained in:
qiang 2022-08-10 21:03:58 +08:00 committed by zhenyuWang
parent 7d481b4a89
commit a26301c170

View File

@ -1,6 +1,7 @@
const path = require('path')
const webpack = require('webpack')
const config = {
parser: require('postcss-comment'),
plugins: [
require('postcss-import')({
resolve (id, basedir, importOptions) {
@ -20,7 +21,7 @@ const config = {
require('@dcloudio/vue-cli-plugin-uni/packages/postcss')
]
}
if (webpack.version[0] <= 4) {
options.parser = require('postcss-comment')
if (webpack.version[0] > 4) {
delete config.parser
}
module.exports = config