Compare commits
No commits in common. "d2838808b81de5ff7a3398003693b9a285f4d923" and "19b886e222d3f6e0e3a1cc89005458a58c27a93a" have entirely different histories.
d2838808b8
...
19b886e222
38
package.json
38
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cubetiq/muui",
|
"name": "@cubetiq/muui",
|
||||||
"version": "0.0.1-alpha.2",
|
"version": "0.0.1",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sambo Chea",
|
"name": "Sambo Chea",
|
||||||
"email": "sombochea@cubetiqs.com"
|
"email": "sombochea@cubetiqs.com"
|
||||||
@ -15,29 +15,24 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "./dist/muui-vite.umd.js",
|
"main": "./dist/muui-vite.umd.js",
|
||||||
"module": "./dist/muui-vite.es.js",
|
"module": "./dist/muui-vite.es.js",
|
||||||
"types": "./dist/index.d.ts",
|
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"import": "./dist/muui-vite.es.js",
|
"import": "./dist/muui-vite.es.js",
|
||||||
"require": "./dist/muui-vite.umd.js"
|
"require": "./dist/muui-vite.umd.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"dist"
|
|
||||||
],
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "tsc && vite build"
|
"build": "tsc && vite build",
|
||||||
},
|
"preview": "vite preview",
|
||||||
"peerDependencies": {
|
"test": "vitest run",
|
||||||
"@emotion/react": "^11.x",
|
"watch": "vitest",
|
||||||
"@emotion/styled": "^11.x",
|
"coverage": "vitest run --coverage"
|
||||||
"@mui/icons-material": "^5.x",
|
|
||||||
"@mui/material": "^5.x",
|
|
||||||
"react": "^16.8.0 || 17.x || 18.x",
|
|
||||||
"react-dom": "^16.8.0 || 17.x | 18.x"
|
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"react": "^18.0.0",
|
||||||
|
"react-dom": "^18.0.0",
|
||||||
"@types/node": "^17.0.34",
|
"@types/node": "^17.0.34",
|
||||||
"@types/react": "^18.0.0",
|
"@types/react": "^18.0.0",
|
||||||
"@types/react-dom": "^18.0.0",
|
"@types/react-dom": "^18.0.0",
|
||||||
@ -46,7 +41,11 @@
|
|||||||
"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",
|
"vitest": "^0.12.6",
|
||||||
|
"@emotion/react": "^11.9.0",
|
||||||
|
"@emotion/styled": "^11.8.1",
|
||||||
|
"@mui/icons-material": "^5.6.2",
|
||||||
|
"@mui/material": "^5.7.0"
|
||||||
},
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
"production": [
|
"production": [
|
||||||
@ -74,14 +73,7 @@
|
|||||||
"sourceType": "module"
|
"sourceType": "module"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {},
|
||||||
"@emotion/react": "^11.9.0",
|
|
||||||
"@emotion/styled": "^11.8.1",
|
|
||||||
"@mui/icons-material": "^5.6.2",
|
|
||||||
"@mui/material": "^5.7.0",
|
|
||||||
"react": "^18.0.0",
|
|
||||||
"react-dom": "^18.0.0"
|
|
||||||
},
|
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
}
|
}
|
||||||
|
@ -1,20 +1,18 @@
|
|||||||
import * as path from "node:path";
|
import * as path from "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';
|
|
||||||
|
|
||||||
// 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.tsx"),
|
||||||
name: "muui",
|
name: "CUBETIQ MUUI",
|
||||||
formats: ['es', 'umd'],
|
fileName: (format) => `muui-vite.${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 +21,5 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [react(),dts({
|
plugins: [react()],
|
||||||
insertTypesEntry: true
|
|
||||||
})],
|
|
||||||
});
|
});
|
||||||
|
8
vitest.config.js
Normal file
8
vitest.config.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { defineConfig } from "vite";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
test: {
|
||||||
|
globals: false,
|
||||||
|
environment: "jsdom",
|
||||||
|
},
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user