File tree Expand file tree Collapse file tree 2 files changed +1
-16
lines changed Open diff view settings
Expand file tree Collapse file tree 2 files changed +1
-16
lines changed Open diff view settings
Original file line number Diff line number Diff line change 22// It acts as a seed that populates the `vendor/` directory and should not be
33// imported directly.
44
5- import 'https://deno.land/std@0.175.0/encoding/base64.ts'
65import 'https://deno.land/std@0.175.0/http/cookie.ts'
76import 'https://deno.land/std@0.175.0/node/buffer.ts'
87import '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 (
126126 const outputFile = join ( destDir , `server/${ name } .js` )
127127
128128 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 } ";` )
139129 for ( const wasmChunk of wasm ?? [ ] ) {
140130 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 ] ) } )` )
146132 }
147133 }
148134
You can’t perform that action at this time.
0 commit comments