版博士V2.0程序
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.
 
 
 
 

45 regels
1.1 KiB

  1. "use strict";Object.defineProperty(exports, "__esModule", {value: true});
  2. var _chunkUV2MVAHEjs = require('./chunk-UV2MVAHE.js');
  3. // src/index.ts
  4. var _unplugin = require('unplugin');
  5. var _common = require('@vue-macros/common');
  6. function resolveOption(options, framework) {
  7. const version = options.version || _common.detectVueVersion.call(void 0, );
  8. return {
  9. include: [_common.REGEX_VUE_SFC, _common.REGEX_SETUP_SFC].concat(
  10. version === 2 && framework === "webpack" ? _common.REGEX_VUE_SUB : []
  11. ),
  12. ...options,
  13. version
  14. };
  15. }
  16. var name = "unplugin-vue-export-props";
  17. var src_default = _unplugin.createUnplugin.call(void 0,
  18. (userOptions = {}, { framework }) => {
  19. const options = resolveOption(userOptions, framework);
  20. const filter = _common.createFilter.call(void 0, options);
  21. return {
  22. name,
  23. enforce: "pre",
  24. transformInclude(id) {
  25. return filter(id);
  26. },
  27. transform(code, id) {
  28. return _chunkUV2MVAHEjs.transformExportProps.call(void 0, code, id);
  29. }
  30. };
  31. }
  32. );
  33. exports.src_default = src_default;