title: Webpack wont bundle an npm module generated with wasm-bindgen
body: <p>I wrote a little library in rust for doing some computation with complex numbers. I generated a wasm bin and js shim with wasm-bindgen cli, published it, and tried to use it in a little react app. For the life of me, I can't get webpack to bundle this thing. </p>
  
  <p>I have an asynchronous split point and am trying to use wasm-loader I'm getting "magic header not detected" from webpack with this configuration. I've also tried not specifying a loader in which case I get at error: "module parse failed: Unexpected section at 0x83" and it tells me I may need an appropriate loader for this. I'm unsure what a magic header is supposed to be or what other loaders to look into.</p>
  
  <p>Here is my package.json and webpack config:</p>
  
  <pre><code>{
    "name": "julia-set",
    "version": "1.0.0",
    "description": "",
    "main": "index.js",
    "scripts": {
      "test": "echo \"Error: no test specified\" &amp;&amp; exit 1"
    },
    "author": "",
    "license": "ISC",
    "dependencies": {
      "@babel/core": "^7.6.2",
      "@babel/preset-env": "^7.6.2",
      "@babel/preset-react": "^7.0.0",
      "babel-loader": "^8.0.6",
      "complex-julia-funcs": "^0.1.0",
      "css-loader": "^3.2.0",
      "express": "^4.17.1",
      "nodemon": "^1.19.3",
      "preset-react": "^1.0.0",
      "react": "^16.10.1",
      "react-dom": "^16.10.1",
      "style-loader": "^1.0.0",
      "volleyball": "^1.5.1",
      "wasm-loader": "^1.3.0",
      "webpack": "4.28.4",
      "webpack-cli": "^3.3.9"
    }
  }
  </code></pre>
  
  <pre><code>module.exports = {
    mode: "development",
    entry: __dirname + "/src/index.js",
    output: {
      path: __dirname + "/public",
      filename: "bundle.js"
    },
    module: {
      rules: [
        {
          test: /\.css$/i,
          use: ["style-loader", "css-loader"]
        },
        {
          test: /\.(js|jsx)$/,
          exclude: /node_modules/,
          use: {
            loader: "babel-loader",
            options: {
              presets: ["@babel/preset-env", "@babel/preset-react"]
            }
          }
        }
      ]
    }
  };
  </code></pre>
  
  <p>and the js code calling the npm module:</p>
  
  <pre><code>const numberReader = async () =&gt; {
    const { ComplexSqr } = await import("../../node_modules/complex-julia-funcs");
    const z = new ComplexSqr(2, 3);
    console.log(z);
  };
  
  export default numberReader;
  </code></pre>
  
  <p>The npm module is <a href="https://www.npmjs.com/package/complex-julia-funcs" rel="nofollow noreferrer">https://www.npmjs.com/package/complex-julia-funcs</a></p>