modern_spreadsheet/vite.config.ts

39 lines
1.0 KiB
TypeScript

import { defineConfig } from 'vite'
import path from 'path'
import typescript from "@rollup/plugin-typescript";
import { typescriptPaths } from "rollup-plugin-typescript-paths";
import { fileURLToPath } from 'node:url';
export default defineConfig({
base: '/modern_spreadsheet/',
plugins: [],
resolve: {},
server: {
port: 3000,
open: true,
},
build: {
manifest: true,
minify: true,
reportCompressedSize: true,
sourcemap: true,
lib: {
entry: path.resolve(__dirname, "src/main.ts"),
fileName: "main",
formats: ["es", "cjs"],
},
rollupOptions: {
external: ["./src/index.ts"],
plugins: [
typescriptPaths({
preserveExtensions: true
}),
typescript({
sourceMap: false,
declaration: true,
outDir: 'dist'
})
]
},
}
})