Compare commits

...

3 Commits

Author SHA1 Message Date
Sambo Chea cfaafc1ee0
Fixed imports 2022-05-17 08:57:31 +07:00
Sambo Chea 4179da8753
Updated config and packages 2022-05-17 08:51:07 +07:00
Sambo Chea 9be02019de
Updatd config 2022-05-17 08:45:48 +07:00
3 changed files with 16 additions and 1971 deletions

1954
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "@cubetiq/muui", "name": "@cubetiq/muui",
"version": "0.0.1-alpha.2", "version": "0.0.1-alpha.4",
"author": { "author": {
"name": "Sambo Chea", "name": "Sambo Chea",
"email": "sombochea@cubetiqs.com" "email": "sombochea@cubetiqs.com"
@ -13,13 +13,13 @@
"mui" "mui"
], ],
"license": "MIT", "license": "MIT",
"main": "./dist/muui-vite.umd.js", "main": "./dist/muui.umd.js",
"module": "./dist/muui-vite.es.js", "module": "./dist/muui.es.js",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
"exports": { "exports": {
".": { ".": {
"import": "./dist/muui-vite.es.js", "import": "./dist/muui.es.js",
"require": "./dist/muui-vite.umd.js" "require": "./dist/muui.umd.js"
} }
}, },
"files": [ "files": [
@ -30,10 +30,6 @@
"build": "tsc && vite build" "build": "tsc && vite build"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/react": "^11.x",
"@emotion/styled": "^11.x",
"@mui/icons-material": "^5.x",
"@mui/material": "^5.x",
"react": "^16.8.0 || 17.x || 18.x", "react": "^16.8.0 || 17.x || 18.x",
"react-dom": "^16.8.0 || 17.x | 18.x" "react-dom": "^16.8.0 || 17.x | 18.x"
}, },
@ -46,7 +42,7 @@
"eslint-plugin-react": "^7.29.4", "eslint-plugin-react": "^7.29.4",
"typescript": "^4.6.3", "typescript": "^4.6.3",
"vite": "^2.9.9", "vite": "^2.9.9",
"vite-plugin-dts": "^1.1.1", "vite-plugin-dts": "^1.1.1"
}, },
"browserslist": { "browserslist": {
"production": [ "production": [

View File

@ -1,20 +1,20 @@
import * as path from "node:path"; import * as path from "node:path";
import { defineConfig } from "vite"; import { defineConfig } from "vite";
import react from "@vitejs/plugin-react"; import react from "@vitejs/plugin-react";
import dts from 'vite-plugin-dts'; import dts from "vite-plugin-dts";
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
build: { build: {
lib: { lib: {
entry: path.resolve(__dirname, "src/lib/index.ts"), entry: path.resolve(__dirname, "src/lib/index.ts"),
name: "muui", name: "MUUI",
formats: ['es', 'umd'], formats: ["es", "umd"],
fileName: (format) => `muui.${format}.js`, fileName: (format) => `muui.${format}.js`,
}, },
rollupOptions: { rollupOptions: {
// externalize deps that shouldn't be bundled // externalize deps that shouldn't be bundled
external: ["react", "react-dom", "@emotion/react", "@emotion/styled", "@mui/icons-material", "@mui/material"], external: ["react", "react-dom"],
output: { output: {
// Provide global variables to use in the UMD build for externalized deps // Provide global variables to use in the UMD build for externalized deps
globals: { globals: {
@ -23,7 +23,10 @@ export default defineConfig({
}, },
}, },
}, },
plugins: [react(),dts({ plugins: [
insertTypesEntry: true react(),
})], dts({
insertTypesEntry: true,
}),
],
}); });