Files
twtxt-lib/vite.config.js
Eric Woodward 1c06197be0 resolve issue with missing vite-plugin-node-polyfills
add LibreJS licenses to all demo JS
split browser build from node build
add copyright info to license files
update to use yarn v4.13.0
update to v0.9.2
2026-03-07 20:47:14 -05:00

32 lines
693 B
JavaScript

import dts from "unplugin-dts/vite";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { defineConfig } from "vite";
import { nodePolyfills } from "vite-plugin-node-polyfills";
const __dirname = dirname(fileURLToPath(import.meta.url));
/* Only used for development, does not affect build */
export default defineConfig({
plugins: [
dts({ exclude: ["**/__tests__/*.*"] }),
nodePolyfills({
include: ["buffer"],
globals: {
Buffer: true,
},
}),
],
build: {
lib: {
entry: resolve(__dirname, "src/index.ts"),
name: "twtxt-lib",
fileName: "index",
formats: ["es"],
outDir: "./dist",
},
minify: false,
},
});