Skip to content

About

Add WebAssembly integration to farm

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

farm-plugin-wasm

Add WebAssembly integration to farm

Installation

pnpm add -D farm-plugin-wasm

Usage

import { defineConfig } from "@farmfe/core";
import wasm from 'farm-plugin-wasm';

interface Options {
  /* Your options here */
  /**
   * Whether to split the WASM file
   */
  isolate?: boolean // default: false
}

export default defineConfig({
  compilation: {
    input: {
      index: "./index.html",
    },
    output: {
      filename: 'assets/[ext]/[name].[hash].[ext]',
      assetsFilename: 'static/[resourceName].[ext]'
    },
    persistentCache: false,
    progress: false,
  },
  plugins: [
    wasm({
      isolate: false
    })
  ]
});

Notes

If you set the isolateoption to true, the plugin will use top level await to get the wasm file.

About

Add WebAssembly integration to farm

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages