版博士V2.0程序
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

42 lines
964 B

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