Skip to content

Commit

Permalink
build config
Browse files Browse the repository at this point in the history
  • Loading branch information
kinghat committed Sep 20, 2022
1 parent 6e8c691 commit a9d3891
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { defineConfig, UserConfigExport } from "vite";
import { defineConfig } from "vite";
import type { UserConfig } from "vite";
import { resolve } from "path";

export default defineConfig(({ command, mode }) => {
const config: UserConfig = {
build: {
lib: {
entry: "src/tabbed-card.ts",
formats: ["es"],
rollupOptions: {
input: {
"tabbed-card": resolve(__dirname, "src/tabbed-card.ts"),
},
output: {
entryFileNames: "[name].js",
},
},
// rollupOptions: {
// external: /^lit/,
// },
},
};

Expand All @@ -19,7 +21,7 @@ export default defineConfig(({ command, mode }) => {
return {
build: {
...config.build,
outDir: "./.temp",
outDir: "./temp",
watch: {},
minify: false,
},
Expand Down

0 comments on commit a9d3891

Please sign in to comment.