scriptLoader.cjs 729 B

123456789101112131415161718192021222324
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', { value: true });
  3. const loaderShared = require('@vuetify/loader-shared');
  4. const VuetifyLoader = (function VuetifyLoader(content, sourceMap) {
  5. if (this.data?.skip) {
  6. return content;
  7. }
  8. this.async();
  9. this.cacheable();
  10. const options = this.getOptions();
  11. const { code: imports, source } = loaderShared.generateImports(content, options);
  12. this.callback(null, source + imports, sourceMap);
  13. });
  14. const pitch = function VuetifyLoaderPitch(remainingRequest, precedingRequest, data) {
  15. if (this.loaders.some((loader) => loader.path.endsWith("vue-loader/dist/pitcher.js"))) {
  16. data.skip = true;
  17. }
  18. };
  19. exports.default = VuetifyLoader;
  20. exports.pitch = pitch;