From 9be02019de21b3535e49c89d9d819892abcb9542 Mon Sep 17 00:00:00 2001 From: Sambo Chea Date: Tue, 17 May 2022 08:45:48 +0700 Subject: [PATCH] Updatd config --- package.json | 2 +- vite.config.ts | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 6849473..3a727cb 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "eslint-plugin-react": "^7.29.4", "typescript": "^4.6.3", "vite": "^2.9.9", - "vite-plugin-dts": "^1.1.1", + "vite-plugin-dts": "^1.1.1" }, "browserslist": { "production": [ diff --git a/vite.config.ts b/vite.config.ts index dbe3054..186e0fb 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,7 @@ import * as path from "node:path"; import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; -import dts from 'vite-plugin-dts'; +import dts from "vite-plugin-dts"; // https://vitejs.dev/config/ export default defineConfig({ @@ -9,12 +9,12 @@ export default defineConfig({ lib: { entry: path.resolve(__dirname, "src/lib/index.ts"), name: "muui", - formats: ['es', 'umd'], + formats: ["es", "umd"], fileName: (format) => `muui.${format}.js`, }, rollupOptions: { // externalize deps that shouldn't be bundled - external: ["react", "react-dom", "@emotion/react", "@emotion/styled", "@mui/icons-material", "@mui/material"], + external: ["react", "react-dom", "@mui/icons-material", "@mui/material"], output: { // Provide global variables to use in the UMD build for externalized deps globals: { @@ -23,7 +23,10 @@ export default defineConfig({ }, }, }, - plugins: [react(),dts({ -insertTypesEntry: true - })], + plugins: [ + react(), + dts({ + insertTypesEntry: true, + }), + ], });