style: tiny update & remove autoprefixer

This commit is contained in:
菲鸽 2024-01-31 18:50:58 +08:00
parent 2c5f409ac5
commit da3b31c446
3 changed files with 11 additions and 10 deletions

View File

@ -2,19 +2,20 @@
* 本文件会在依赖包安装时执行用以生成 `src/manifest.json`
* 如果不存在 `src/manifest.json` 会运行报错提示找不到 `src/manifest.json`
* 如果中途自己删除了 'src/manifest.json' 文件记得手动执行本文件可以右键 `Run Code` 快速执行
*
* 本文件是为了兼容 window 系统才生成的
*/
// eslint-disable-next-line @typescript-eslint/no-var-requires
const fs = require('fs')
const filePath = './src/manifest.json'
console.log(filePath)
if (fs.existsSync(filePath)) {
console.log(`${filePath}存在`)
// console.log(`${filePath}存在`)
} else {
console.log(`${filePath}不存在,需要创建`)
// console.log(`${filePath}不存在,需要创建`)
fs.writeFile(filePath, '{}\n', {}, () => {
console.log(`${filePath}已经成功创建,并写入{}`)
// console.log(`${filePath}已经成功创建,并写入{}`)
})
}

View File

@ -3,7 +3,7 @@
# 如果中途自己删除了 'src/manifest.json' 文件,记得手动执行本文件,可以右键 `Run Code` 快速执行
if test -f ./src/manifest.json; then
echo ./src/manifest.json 存在
# echo ./src/manifest.json 存在
else
touch ./src/manifest.json
echo "{}" >./src/manifest.json

View File

@ -13,7 +13,7 @@ import UniPlatform from '@uni-helper/vite-plugin-uni-platform'
import UniManifest from '@uni-helper/vite-plugin-uni-manifest'
// @see https://unocss.dev/
import UnoCSS from 'unocss/vite'
import autoprefixer from 'autoprefixer'
// import autoprefixer from 'autoprefixer'
// @see https://github.com/jpkleemans/vite-svg-loader
import svgLoader from 'vite-svg-loader'
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
@ -136,10 +136,10 @@ export default ({ command, mode }) => {
css: {
postcss: {
plugins: [
autoprefixer({
// 指定目标浏览器
overrideBrowserslist: ['> 1%', 'last 2 versions'],
}),
// autoprefixer({
// // 指定目标浏览器
// overrideBrowserslist: ['> 1%', 'last 2 versions'],
// }),
],
},
},