unocss.config.ts 801 B

123456789101112131415161718192021222324252627
  1. import presetWeapp from 'unocss-preset-weapp'
  2. import { extractorAttributify, transformerClass } from 'unocss-preset-weapp/transformer'
  3. const { presetWeappAttributify, transformerAttributify } = extractorAttributify()
  4. export default {
  5. presets: [
  6. // https://github.com/MellowCo/unocss-preset-weapp
  7. presetWeapp(),
  8. // attributify autocomplete
  9. presetWeappAttributify()
  10. ],
  11. shortcuts: [
  12. {
  13. 'border-base': 'border border-gray-500_10',
  14. center: 'flex justify-center items-center'
  15. }
  16. ],
  17. transformers: [
  18. // https://github.com/MellowCo/unocss-preset-weapp/tree/main/src/transformer/transformerAttributify
  19. transformerAttributify(),
  20. // https://github.com/MellowCo/unocss-preset-weapp/tree/main/src/transformer/transformerClass
  21. transformerClass()
  22. ]
  23. }