Skip to content

Commit 13fcc60

Browse files
committedMar 27, 2025·
fix: broken compiled hook
1 parent 52dd77d commit 13fcc60

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎src/build/build.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ export async function setupBuildHandler(config: ModuleOptions, resolve: Resolver
4343
if (compatibility.wasm?.esmImport !== true)
4444
return
4545
const configuredEntry = nitro.options.rollupConfig?.output.entryFileNames
46-
const serverEntry = resolve(_nitro.options.output.serverDir, typeof configuredEntry === 'string'
46+
const serverEntry = resolve.resolve(_nitro.options.output.serverDir, typeof configuredEntry === 'string'
4747
? configuredEntry
4848
: 'index.mjs')
4949
const wasmEntries = [serverEntry]
5050
if (isCloudflarePagesOrModule) {
5151
// this is especially hacky, basically need to add all paths the wasm import can exist on
5252
// TODO maybe implement https://github.com/pi0/nuxt-shiki/blob/50e80fb6454de561e667630b4e410d2f7b5f2d35/src/module.ts#L103-L128
53-
wasmEntries.push(resolve(dirname(serverEntry), './chunks/wasm.mjs'))
54-
wasmEntries.push(resolve(dirname(serverEntry), './chunks/_/wasm.mjs'))
55-
wasmEntries.push(resolve(dirname(serverEntry), './chunks/index_bg.mjs'))
53+
wasmEntries.push(resolve.resolve(dirname(serverEntry), './chunks/wasm.mjs'))
54+
wasmEntries.push(resolve.resolve(dirname(serverEntry), './chunks/_/wasm.mjs'))
55+
wasmEntries.push(resolve.resolve(dirname(serverEntry), './chunks/index_bg.mjs'))
5656
}
5757
const resvgHash = await resolveFilePathSha1('@resvg/resvg-wasm/index_bg.wasm')
5858
const yogaHash = await resolveFilePathSha1('yoga-wasm-web/dist/yoga.wasm')

0 commit comments

Comments
 (0)
Please sign in to comment.