@particle-network/vite-plugin-wasm
v1.0.3
Published
A Vite plugin for handling Particle Network WASM files.
Downloads
15
Readme
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()],
});