diff --git a/.vscode/settings.json b/.vscode/settings.json index 56ee0fc..51a9fd9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,7 +3,7 @@ "eslint.experimental.useFlatConfig": true, // Disable the default formatter, use eslint instead - "prettier.enable": false, + "prettier.enable": true, "editor.formatOnSave": false, // Auto fix diff --git a/package.json b/package.json index 2f58d1c..2ff3c5f 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "@dcloudio/uni-stacktracey": "3.0.0-3090920231225001", "@dcloudio/vite-plugin-uni": "3.0.0-3090920231225001", "@uni-helper/eslint-config": "^0.0.6", - "@uni-helper/unocss-preset-uni": "^0.2.6", + "@uni-helper/unocss-preset-uni": "^0.2.7", "@uni-helper/vite-plugin-uni-pages": "^0.2.14", "@unocss/transformer-directives": "0.58.0", "@viarotel-org/unocss-preset-shades": "^0.7.4", diff --git a/unocss.config.js b/unocss.config.js index 7b6236c..4d7c188 100644 --- a/unocss.config.js +++ b/unocss.config.js @@ -1,26 +1,18 @@ import { defineConfig } from 'unocss' import transformerDirectives from '@unocss/transformer-directives' -import { presetApplet, presetRemRpx } from 'unocss-applet' import { presetShades } from '@viarotel-org/unocss-preset-shades' -import presetWind from '@unocss/preset-wind' +import { presetUni } from '@uni-helper/unocss-preset-uni' import { primaryColor } from './src/configs/index.js' -const isApplet = process.env?.UNI_PLATFORM?.startsWith('mp-') ?? false - -const presetMain = isApplet ? presetApplet() : presetWind() +const presetMain = presetUni({ attributify: false }) const presets = [ presetMain, presetShades(primaryColor), - presetRemRpx(), ] export default defineConfig({ - theme: { - colors: { - gray: presetMain?.theme?.colors?.neutral, - }, - }, + theme: {}, // @ts-ignore presets, transformers: [transformerDirectives()],