1 Star 0 Fork 0

吴少建/租客管理

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
postcss.config.js 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
Spacks Wu 提交于 2024-01-27 00:11 . init
if (process.env.VITE_ROOT_DIR) { // vite
const {
uniPostcssPlugin,
parseRpx2UnitOnce,
} = require('@dcloudio/uni-cli-shared')
module.exports = {
plugins: [
uniPostcssPlugin(
Object.assign({
page: process.env.UNI_PLATFORM === 'h5' ? 'uni-page-body' : 'body'
},
parseRpx2UnitOnce(process.env.UNI_INPUT_DIR)
)
),
require('autoprefixer')(),
],
}
} else {
const path = require('path')
module.exports = {
parser: 'postcss-comment',
plugins: {
'postcss-import': {
resolve(id, basedir, importOptions) {
if (id.startsWith('~@/')) {
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(3))
} else if (id.startsWith('@/')) {
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(2))
} else if (id.startsWith('/') && !id.startsWith('//')) {
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(1))
}
return id
}
},
'autoprefixer': {
overrideBrowserslist: ["> 1%", "last 2 versions", "not dead"],
remove: process.env.UNI_PLATFORM !== 'h5',
ignoreUnknownVersions: true
},
'@dcloudio/vue-cli-plugin-uni/packages/postcss': {}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/love-yanxi/tenant-management.git
git@gitee.com:love-yanxi/tenant-management.git
love-yanxi
tenant-management
租客管理
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385