版博士V2.0程序
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 

43 wiersze
883 B

  1. import {
  2. transformSetupBlock
  3. } from "./chunk-QAYSRE3T.mjs";
  4. // src/index.ts
  5. import { createUnplugin } from "unplugin";
  6. import {
  7. REGEX_SETUP_SFC,
  8. REGEX_VUE_SFC,
  9. createFilter,
  10. detectVueVersion
  11. } from "@vue-macros/common";
  12. function resolveOption(options) {
  13. const version = options.version || detectVueVersion();
  14. return {
  15. include: [REGEX_VUE_SFC, REGEX_SETUP_SFC],
  16. defaultLang: "ts",
  17. ...options,
  18. version
  19. };
  20. }
  21. var name = "unplugin-vue-setup-block";
  22. var src_default = createUnplugin(
  23. (userOptions = {}) => {
  24. const options = resolveOption(userOptions);
  25. const filter = createFilter(options);
  26. return {
  27. name,
  28. enforce: "pre",
  29. transformInclude(id) {
  30. return filter(id);
  31. },
  32. transform(code, id) {
  33. return transformSetupBlock(code, id, options.defaultLang);
  34. }
  35. };
  36. }
  37. );
  38. export {
  39. src_default
  40. };