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
32 lines
693 B
JavaScript
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,
|
|
},
|
|
});
|