Update build config so imports work as expected
This commit is contained in:
@@ -1,2 +1 @@
|
||||
export { default as ThemeProvider, useTheme } from "$/providers/theme/ThemeProvider";
|
||||
|
||||
@@ -6,6 +6,6 @@ export * from "$/component/modal";
|
||||
export * from "$/component/nav";
|
||||
export * from "$/component/progress";
|
||||
export * from "$/component/tab";
|
||||
export * from "$/component/theme";
|
||||
export * from "$/component/toaster";
|
||||
export * from "$/providers/theme/theme";
|
||||
|
||||
|
||||
@@ -69,7 +69,6 @@
|
||||
"type": "git",
|
||||
"url": "git+https://git.mattrixwv.com/BaseLibraries/MattrixwvReactComponents.git"
|
||||
},
|
||||
"main": "./dist/mattrixwv-components.cjs",
|
||||
"module": "./dist/mattrixwv-components.js",
|
||||
"types": "./dist/mattrixwv-components.d.ts",
|
||||
"exports": {
|
||||
@@ -109,6 +108,10 @@
|
||||
"types": "./dist/tab.d.ts",
|
||||
"import": "./dist/tab.js"
|
||||
},
|
||||
"./theme": {
|
||||
"types": "./dist/theme.d.ts",
|
||||
"import": "./dist/theme.js"
|
||||
},
|
||||
"./toaster": {
|
||||
"types": "./dist/toaster.d.ts",
|
||||
"import": "./dist/toaster.js"
|
||||
|
||||
@@ -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" ],
|
||||
|
||||
Reference in New Issue
Block a user