MCPcopy
hub / github.com/originjs/vite-plugin-federation / parseExposeOptions

Function parseExposeOptions

packages/lib/src/utils/index.ts:83–101  ·  view source on GitHub ↗
(
  options: VitePluginFederationOptions
)

Source from the content-addressed store, hash-verified

81}
82
83export function parseExposeOptions(
84 options: VitePluginFederationOptions
85): (string | ConfigTypeSet)[] {
86 return parseOptions(
87 options.exposes,
88 (item) => {
89 return {
90 import: item,
91 name: undefined,
92 dontAppendStylesToHead: false
93 }
94 },
95 (item) => ({
96 import: item.import,
97 name: item.name || undefined,
98 dontAppendStylesToHead: item.dontAppendStylesToHead || false
99 })
100 )
101}
102
103export function createContentHash(path: string): string {
104 const content = readFileSync(path, { encoding: 'utf-8' })

Callers 3

devExposePluginFunction · 0.90
prodExposePluginFunction · 0.90
generateBundleFunction · 0.90

Calls 1

parseOptionsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…