This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
packages/core/src/plugins Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,17 @@ export class BindingsPlugin
8383 const bindings : Context = { } ;
8484 const watch : string [ ] = [ ] ;
8585
86+ // Load WebAssembly module bindings from files
87+ if ( this . wasmBindings ) {
88+ for ( const [ name , wasmPath ] of Object . entries ( this . wasmBindings ) ) {
89+ bindings [ name ] = new WebAssembly . Module ( await fs . readFile ( wasmPath ) ) ;
90+ watch . push ( wasmPath ) ;
91+ }
92+ }
93+
94+ // Copy user's arbitrary bindings
95+ Object . assign ( bindings , this . bindings ) ;
96+
8697 // Load bindings from .env file
8798 const envPath = this . envPath === true ? this . defaultEnvPath : this . envPath ;
8899 if ( envPath ) {
@@ -98,17 +109,6 @@ export class BindingsPlugin
98109 watch . push ( envPath ) ;
99110 }
100111
101- // Load WebAssembly module bindings from files
102- if ( this . wasmBindings ) {
103- for ( const [ name , wasmPath ] of Object . entries ( this . wasmBindings ) ) {
104- bindings [ name ] = new WebAssembly . Module ( await fs . readFile ( wasmPath ) ) ;
105- watch . push ( wasmPath ) ;
106- }
107- }
108-
109- // Copy user's arbitrary bindings
110- Object . assign ( bindings , this . bindings ) ;
111-
112112 return { globals : this . globals , bindings, watch } ;
113113 }
114114}
You can’t perform that action at this time.
0 commit comments