Updatd config
This commit is contained in:
parent
d2838808b8
commit
9be02019de
@ -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": [
|
||||
|
@ -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,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user