MCPcopy
hub / github.com/vitejs/vite / toPreloadTag

Function toPreloadTag

packages/vite/src/node/plugins/html.ts:873–883  ·  view source on GitHub ↗
(
        filename: string,
        toOutputPath: (filename: string) => string,
      )

Source from the content-addressed store, hash-verified

871 })
872
873 const toPreloadTag = (
874 filename: string,
875 toOutputPath: (filename: string) => string,
876 ): HtmlTagDescriptor => ({
877 tag: 'link',
878 attrs: {
879 rel: 'modulepreload',
880 crossorigin: true,
881 href: toOutputPath(filename),
882 },
883 })
884
885 const toStyleSheetLinkTag = (
886 file: string,

Callers 1

generateBundleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected