@@ -17,8 +17,8 @@ function baseNextConfig(): Parameters<typeof createNext>[0] {
17
17
const instance$ = WebAssembly.instantiate(wasm);
18
18
19
19
export async function increment(a) {
20
- const { exports } = await instance$;
21
- return exports.add_one(a);
20
+ const { instance } = await instance$;
21
+ return instance. exports.add_one(a);
22
22
}
23
23
` ,
24
24
'pages/index.js' : `
@@ -57,8 +57,8 @@ describe('edge api endpoints can use wasm files', () => {
57
57
const instance$ = WebAssembly.instantiate(wasm);
58
58
59
59
export async function increment(a) {
60
- const { exports } = await instance$;
61
- return exports.add_one(a);
60
+ const { instance } = await instance$;
61
+ return instance. exports.add_one(a);
62
62
}
63
63
` ,
64
64
} ,
@@ -101,16 +101,12 @@ describe('middleware can use wasm files', () => {
101
101
102
102
if ( ! ( global as any ) . isNextDeploy ) {
103
103
it ( 'lists the necessary wasm bindings in the manifest' , async ( ) => {
104
- const manifestPath = path . join (
105
- next . testDir ,
106
- '.next/server/middleware-manifest.json'
107
- )
104
+ const manifestPath = path . join ( next . testDir , '.next/server/middleware-manifest.json' )
108
105
const manifest = await fs . readJSON ( manifestPath )
109
106
expect ( manifest . middleware [ '/' ] ) . toMatchObject ( {
110
107
wasm : [
111
108
{
112
- filePath :
113
- 'server/edge-chunks/wasm_58ccff8b2b94b5dac6ef8957082ecd8f6d34186d.wasm' ,
109
+ filePath : 'server/edge-chunks/wasm_58ccff8b2b94b5dac6ef8957082ecd8f6d34186d.wasm' ,
114
110
name : 'wasm_58ccff8b2b94b5dac6ef8957082ecd8f6d34186d' ,
115
111
} ,
116
112
] ,
0 commit comments