2025-10-25 22:04:41 +02:00
|
|
|
import { defineConfig } from "vite";
|
|
|
|
|
import path from "path";
|
|
|
|
|
import wasm from "vite-plugin-wasm";
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [wasm()], // include wasm plugin
|
|
|
|
|
build: {
|
|
|
|
|
lib: {
|
|
|
|
|
entry: path.resolve(__dirname, "src/index.ts"),
|
|
|
|
|
name: "buttplug",
|
|
|
|
|
fileName: "index",
|
|
|
|
|
formats: ["es"], // this is important
|
|
|
|
|
},
|
|
|
|
|
minify: false, // for demo purposes
|
|
|
|
|
target: "esnext", // this is important as well
|
|
|
|
|
outDir: "dist",
|
2026-02-06 14:46:47 +01:00
|
|
|
rollupOptions: {
|
|
|
|
|
external: [/\.\/wasm\//, /\.\.\/wasm\//],
|
|
|
|
|
},
|
2025-10-25 22:04:41 +02:00
|
|
|
},
|
|
|
|
|
});
|