Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions crates/mesh-llm-ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,12 @@ function stripBundledOnnxWasm(): PluginOption {
// asset-emitter pattern matcher does not constant-fold it back into a
// static URL. We also alias `import.meta` to a binding so it stops
// being a syntactic match for `import.meta.url`.
const rewritten = code.replace(
PATTERN,
(_match, _quote, file) => {
const half = Math.floor(file.length / 2)
const a = JSON.stringify(file.slice(0, half))
const b = JSON.stringify(file.slice(half))
return `new URL(${a}+${b}, (0,()=>import.meta)().url)`
}
)
const rewritten = code.replace(PATTERN, (_match, _quote, file) => {
const half = Math.floor(file.length / 2)
const a = JSON.stringify(file.slice(0, half))
const b = JSON.stringify(file.slice(half))
return `new URL(${a}+${b}, (0,()=>import.meta)().url)`
})
return { code: rewritten, map: null }
}
}
Expand Down
Loading