8090公寓——企业微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

postcss.config.js 746 B

2 years ago
12345678910111213141516171819202122
  1. const path = require('path')
  2. module.exports = {
  3. parser: require('postcss-comment'),
  4. plugins: [
  5. require('postcss-import')({
  6. resolve (id, basedir, importOptions) {
  7. if (id.startsWith('~@/')) {
  8. return path.resolve(process.env.UNI_INPUT_DIR, id.substr(3))
  9. } else if (id.startsWith('@/')) {
  10. return path.resolve(process.env.UNI_INPUT_DIR, id.substr(2))
  11. } else if (id.startsWith('/') && !id.startsWith('//')) {
  12. return path.resolve(process.env.UNI_INPUT_DIR, id.substr(1))
  13. }
  14. return id
  15. }
  16. }),
  17. require('autoprefixer')({
  18. remove: process.env.UNI_PLATFORM !== 'h5'
  19. }),
  20. require('@dcloudio/vue-cli-plugin-uni/packages/postcss')
  21. ]
  22. }