index.js 886 B

12345678910111213141516171819
  1. "use strict";
  2. var __importDefault = (this && this.__importDefault) || function (mod) {
  3. return (mod && mod.__esModule) ? mod : { "default": mod };
  4. };
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. exports.initPostcssPlugin = exports.uniPostcssScopedPlugin = exports.uniPostcssPlugin = void 0;
  7. const stylePluginScoped_1 = __importDefault(require("./plugins/stylePluginScoped"));
  8. exports.uniPostcssScopedPlugin = stylePluginScoped_1.default;
  9. const uniapp_1 = __importDefault(require("./plugins/uniapp"));
  10. exports.uniPostcssPlugin = uniapp_1.default;
  11. function initPostcssPlugin({ uniApp, autoprefixer, } = {}) {
  12. const plugins = [(0, uniapp_1.default)(uniApp)];
  13. // nvue 不需要 autoprefixer
  14. if (autoprefixer !== false) {
  15. plugins.push(require('autoprefixer')(autoprefixer));
  16. }
  17. return plugins;
  18. }
  19. exports.initPostcssPlugin = initPostcssPlugin;