版博士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.
 
 
 
 

31 lines
624 B

  1. // src/unplugin.ts
  2. import { createFilter as createRollupFilter } from "@rollup/pluginutils";
  3. import {
  4. normalizePath,
  5. attachScopes
  6. } from "@rollup/pluginutils";
  7. function getTransformResult(s, id) {
  8. if (s == null ? void 0 : s.hasChanged()) {
  9. return {
  10. code: s.toString(),
  11. get map() {
  12. return s.generateMap({
  13. source: id,
  14. includeContent: true,
  15. hires: true
  16. });
  17. }
  18. };
  19. }
  20. }
  21. function createFilter(options) {
  22. return createRollupFilter(options.include, options.exclude);
  23. }
  24. export {
  25. getTransformResult,
  26. createFilter,
  27. normalizePath,
  28. attachScopes
  29. };