title: Dynamic importing WASM. Order of execution issue
body: <p>I'm trying to load a WASM library from another <strong>node js</strong> application (Both using webpack). On the WASM library, I have following code to export the functionality.</p>
  <pre><code>export default import(&quot;./pkg&quot;)
      .then(s =&gt; {
          let result = s.initialize_sync();
          console.log(&quot;result = &quot;, result);
          return s;
      }).catch(error =&gt; {
          console.error(error);
          throw error;
      });
  </code></pre>
  <p>And on the application, I have the following.</p>
  <pre><code>let s = await import(&quot;s-wasm&quot;);
  console.log(&quot;2 s = &quot;, s);
        
  </code></pre>
  <p>I'm getting the following <strong>log lines</strong> when running the application.</p>
  <pre><code>2 s =  { default: {} }
  result =  initialized
  </code></pre>
  <p>What I am expecting:</p>
  <pre><code>result =  initialized
  2 s =  { default: {} }
  </code></pre>
  <p>I want the <code>2 s = </code> line to be printed after WASM is loaded. but it is called before the WASM is loaded. How do I achieve this ? What am I doing wrong here ?</p>