Update build config so imports work as expected

This commit is contained in:
2026-03-11 22:52:46 -04:00
parent 0de206016a
commit ca342cc238
4 changed files with 7 additions and 5 deletions

View File

@@ -10,7 +10,7 @@ import { viteStaticCopy } from "vite-plugin-static-copy";
import { peerDependencies } from "./package.json";
const modules = [ "button", "input", "loading", "message", "modal", "nav", "progress", "tab", "toaster" ];
const modules = [ "button", "input", "loading", "message", "modal", "nav", "progress", "tab", "theme", "toaster" ];
// https://vite.dev/config/
@@ -51,7 +51,7 @@ export default defineConfig({
build: {
lib: {
entry: {
index: resolve(__dirname, "lib/index.ts"),
"mattrixwv-components": resolve(__dirname, "lib/index.ts"),
...Object.fromEntries(modules.map(mod => [mod, resolve(__dirname, `lib/component/${mod}/index.ts`)]))
},
formats: [ "es" ],