scriptLoader.mjs 627 B

12345678910111213141516171819
  1. import { generateImports } from '@vuetify/loader-shared';
  2. const VuetifyLoader = (function VuetifyLoader(content, sourceMap) {
  3. if (this.data?.skip) {
  4. return content;
  5. }
  6. this.async();
  7. this.cacheable();
  8. const options = this.getOptions();
  9. const { code: imports, source } = generateImports(content, options);
  10. this.callback(null, source + imports, sourceMap);
  11. });
  12. const pitch = function VuetifyLoaderPitch(remainingRequest, precedingRequest, data) {
  13. if (this.loaders.some((loader) => loader.path.endsWith("vue-loader/dist/pitcher.js"))) {
  14. data.skip = true;
  15. }
  16. };
  17. export { VuetifyLoader as default, pitch };