@kashifd/jwero-components 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kashifd/jwero-components",
3
3
  "private": false,
4
- "version": "0.1.8",
4
+ "version": "0.1.10",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -43,7 +43,9 @@
43
43
  "vite": "^5.3.1"
44
44
  },
45
45
  "description": "This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.",
46
- "main": "./src/index.tsx",
46
+ "main": "./dist/jwero-components.es.js",
47
+ "module": "./dist/jwero-components.es.js",
48
+ "types": "./dist/types/index.d.ts",
47
49
  "repository": {
48
50
  "type": "git",
49
51
  "url": "git+https://github.com/kashifkd/jwero-components.git"
package/tsconfig.app.json CHANGED
@@ -1,5 +1,8 @@
1
1
  {
2
2
  "compilerOptions": {
3
+ "outDir": "./dist",
4
+ "declarationDir": "./dist/types",
5
+ "declaration": true,
3
6
  "composite": true,
4
7
  "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5
8
  "target": "ES2020",
package/vite.config.ts CHANGED
@@ -1,24 +1,26 @@
1
1
  import { defineConfig } from 'vite';
2
2
  import react from '@vitejs/plugin-react-swc';
3
+ import path from 'path';
3
4
 
4
5
  export default defineConfig({
5
6
  plugins: [react()],
6
7
  build: {
7
8
  lib: {
8
- entry: 'src/index.tsx',
9
+ entry: path.resolve(__dirname, 'src/index.tsx'),
9
10
  name: 'JweroComponents',
10
- fileName: (format) => `index.${format}.js`,
11
+ fileName: (format) => `jwero-components.${format}.js`,
11
12
  },
12
13
  rollupOptions: {
13
- // Make sure to externalize deps that shouldn't be bundled
14
- // into your library
15
- external: ['react', 'react-dom'],
14
+ external: ['react', 'react-dom', '@emotion/react', '@emotion/styled', '@mui/material'],
16
15
  output: {
17
16
  globals: {
18
17
  react: 'React',
19
18
  'react-dom': 'ReactDOM',
20
- },
21
- },
22
- },
23
- },
19
+ '@emotion/react': 'emotionReact',
20
+ '@emotion/styled': 'emotionStyled',
21
+ '@mui/material': 'muiMaterial'
22
+ }
23
+ }
24
+ }
25
+ }
24
26
  });