golang

module
v0.0.0-...-03f6605 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2019 License: MIT

README

@wasm-tool/golang

Golang loader for Webpack

Attention

This plugin is still experimental. Golang used to generate big Wasm modules which may take time to decode.

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: process.env["GOROOT"],
          GOPATH: process.env["GOPATH"]
        }
      }
    ]
  },
  node: {
    fs: "empty"
  }

  // ...
};

Directories

Path Synopsis
example
src

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL