@particle-network/vite-plugin-wasm
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

vite-plugin-wasm

A Vite plugin for handling Particle Network WASM files.

Installation

npm install @particle-network/vite-plugin-wasm

Usage

Vue

To use the plugin in a Vue project, update your vite.config.js or vite.config.ts as follows:

import particleWasmPlugin from '@particle-network/vite-plugin-wasm';
import vue from '@vitejs/plugin-vue';
import { defineConfig } from 'vite';

export default defineConfig({
    plugins: [vue(), particleWasmPlugin()],
    resolve: {
        alias: {
            buffer: 'buffer',
        },
    },
});

React

To use the plugin in a React project, update your vite.config.js or vite.config.ts as follows:

import particleWasmPlugin from '@particle-network/vite-plugin-wasm';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';

export default defineConfig({
    plugins: [react(), particleWasmPlugin()],
});

Readme

Keywords

none

Package Sidebar

Install

npm i @particle-network/vite-plugin-wasm

Weekly Downloads

0

Version

1.0.3

License

Apache-2.0

Unpacked Size

15.9 kB

Total Files

9

Last publish

Collaborators

  • wlasd5688
  • particle-web3