resolveScript.d.ts 807 B

12345678910111213
  1. import type { LoaderContext } from 'webpack';
  2. import type { SFCDescriptor, SFCScriptBlock } from 'vue/compiler-sfc';
  3. import type { VueLoaderOptions } from 'src';
  4. export declare const clientCache: WeakMap<SFCDescriptor, SFCScriptBlock | null>;
  5. export declare const typeDepToSFCMap: Map<string, Set<string>>;
  6. /**
  7. * inline template mode can only be enabled if:
  8. * - is production (separate compilation needed for HMR during dev)
  9. * - template has no pre-processor (separate loader chain required)
  10. * - template is not using src
  11. */
  12. export declare function canInlineTemplate(descriptor: SFCDescriptor, isProd: boolean): boolean;
  13. export declare function resolveScript(descriptor: SFCDescriptor, scopeId: string, options: VueLoaderOptions, loaderContext: LoaderContext<VueLoaderOptions>): SFCScriptBlock | null;