Trying to upgrade docx to use Vite

This commit is contained in:
Dolan Miu
2023-05-01 20:37:39 +01:00
parent 18b2e91da2
commit a26292a0fd
20 changed files with 1178 additions and 312 deletions

23
vite.config.js Normal file
View File

@ -0,0 +1,23 @@
import { defineConfig } from "vite";
import { resolve } from "path";
import tsconfigPaths from "vite-tsconfig-paths";
/** @type {import('vite').UserConfig} */
export default defineConfig({
plugins: [
tsconfigPaths(),
],
build: {
lib: {
entry: [resolve(__dirname, "src/index.ts")],
name: "docx",
fileName: "index",
formats: ["iife", "es", "cjs", "umd"],
},
outDir: resolve(__dirname, "dist"),
commonjsOptions: {
include: [/node_modules/],
},
},
});