@wasm-tool/golang

Golang loader for Webpack

Usage no npm install needed!

<script type="module">
  import wasmToolGolang from 'https://cdn.skypack.dev/@wasm-tool/golang';
</script>

README

@wasm-tool/golang

Golang loader for Webpack

Installation

npm i -D @wasm-tool/golang

Usage

Since WebAssembly support in Golang hasn't been released yet, you'll need to compile master on your own.

The GOROOT options should point to your fresh Golang installation.

module.exports = {
  // ...

  module: {
    rules: [
      {
        test: /\.go$/,
        loader: "@wasm-tool/golang",
        options: {
          GOROOT: "~/go"
        }
      }
    ]
  },
  node: {
    fs: "empty"
  }

  // ...
};