Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/go-courier/rollup-plugin-go-wasm


https://github.com/go-courier/rollup-plugin-go-wasm

golang rollup vitejs webassembly

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# Rollup Plugin Go Wasm

## Features

```
app/
main.go
main.ts
```

```ts
// main.ts
// @ts-ignore
import ("main.go").then(({ main }) => main());
```

## In Vite

```js
import { defineConfig } from "vite";
import goWasm from "@go-courier/rollup-plugin-go-wasm";

export default defineConfig({
root: "./app",
build: {
assetsDir: "static",
},
plugins: [
goWasm({
// don't added this if play with rollup
importWasmSuffix: "?url",
}),
],
});
```