File tree 2 files changed +1
-16
lines changed
2 files changed +1
-16
lines changed Original file line number Diff line number Diff line change 2
2
// It acts as a seed that populates the `vendor/` directory and should not be
3
3
// imported directly.
4
4
5
- import 'https://deno.land/std@0.175.0/encoding/base64.ts'
6
5
import 'https://deno.land/std@0.175.0/http/cookie.ts'
7
6
import 'https://deno.land/std@0.175.0/node/buffer.ts'
8
7
import 'https://deno.land/std@0.175.0/node/events.ts'
Original file line number Diff line number Diff line change @@ -126,23 +126,9 @@ const copyHandlerDependencies = async (
126
126
const outputFile = join ( destDir , `server/${ name } .js` )
127
127
128
128
if ( wasm ?. length ) {
129
- const base64ModulePath = join (
130
- destDir ,
131
- 'edge-runtime/vendor/deno.land/std@0.175.0/encoding/base64.ts' ,
132
- )
133
-
134
- const base64ModulePathRelativeToOutputFile = toPosixPath (
135
- relative ( dirname ( outputFile ) , base64ModulePath ) ,
136
- )
137
-
138
- parts . push ( `import { decode as _base64Decode } from "${ base64ModulePathRelativeToOutputFile } ";` )
139
129
for ( const wasmChunk of wasm ?? [ ] ) {
140
130
const data = await readFile ( join ( srcDir , wasmChunk . filePath ) )
141
- parts . push (
142
- `const ${ wasmChunk . name } = _base64Decode(${ JSON . stringify (
143
- data . toString ( 'base64' ) ,
144
- ) } ).buffer`,
145
- )
131
+ parts . push ( `const ${ wasmChunk . name } = Uint8Array.from(${ JSON . stringify ( [ ...data ] ) } )` )
146
132
}
147
133
}
148
134
You can’t perform that action at this time.
0 commit comments