Skip to content

Commit d6e352e

Browse files
authored
feat: change module resolution to bundler (#29)
2 parents cbbc8fb + ea32cd9 commit d6e352e

File tree

8 files changed

+156
-96
lines changed

8 files changed

+156
-96
lines changed

.github/copilot-instructions.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
1. Always use latest React 19 version and TypeScript for our ReactJS development. Always show examples and reference the latest version of React in your responses. If in doubt, use docs from https://react.dev/learn
2+
2. Always use React router, MUI latest components for React development
3+
3. Always use functional components and hooks for state management in React
4+
4. Always use TypeScript for type safety in React components
5+
5. Always use the latest best practices for performance optimization in React, such as memoization and lazy loading
6+
6. Always ensure accessibility standards are met in React components
7+
7. Always use ESLint and Prettier for code formatting and linting in React projects
8+
8. Always provide clear and concise comments in the code to explain complex logic or important decisions
9+
9. Always use PropTypes or TypeScript interfaces for defining component props
10+
10. Always ensure that components are reusable and modular, following the DRY (Don't Repeat Yourself) principle
11+

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "5.8.0",
44
"license": "MIT",
55
"private": false,
6+
"type": "module",
67
"scripts": {
78
"nx": "nx",
89
"start": "nx serve",
@@ -13,14 +14,14 @@
1314
},
1415
"dependencies": {
1516
"@emotion/react": "^11.14.0",
16-
"@emotion/styled": "^11.14.0",
17-
"@mui/icons-material": "^7.1.0",
18-
"@mui/material": "^7.1.0",
19-
"@mui/x-data-grid": "^8.2.0",
17+
"@emotion/styled": "^11.14.1",
18+
"@mui/icons-material": "^7.2.0",
19+
"@mui/material": "^7.2.0",
20+
"@mui/x-data-grid": "^7.29.7",
2021
"date-fns": "^4.1.0",
2122
"react": "^18.3.1 || ^19.0.0",
2223
"react-dom": "^18.3.1 || ^19.0.0",
23-
"react-router-dom": "^7.5.3"
24+
"react-router-dom": "^7.6.3"
2425
},
2526
"devDependencies": {
2627
"@babel/core": "^7.27.1",

pnpm-lock.yaml

Lines changed: 119 additions & 78 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

react-kit/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
"version": "5.8.0",
55
"main": "./index.js",
66
"types": "./index.d.ts",
7+
"type": "module",
78
"publishConfig": {
89
"access": "public"
910
},
1011
"peerDependencies": {
1112
"@emotion/react": "^11.14.0",
12-
"@emotion/styled": "^11.14.0",
13-
"@mui/icons-material": "^6.3.0",
14-
"@mui/lab": "^6.0.0-beta.21",
15-
"@mui/material": "^6.3.0",
13+
"@emotion/styled": "^11.14.1",
14+
"@mui/icons-material": "^7.2.0",
15+
"@mui/material": "^7.2.0",
1616
"date-fns": "^4.1.0",
17-
"react": "^18.3.1",
18-
"react-dom": "^18.3.1",
19-
"react-router-dom": "^7.1.1"
17+
"react": "^18.3.1 || ^19.0.0",
18+
"react-dom": "^18.3.1 || ^19.0.0",
19+
"react-router-dom": "^7.6.3"
2020
},
2121
"exports": {
2222
".": {
@@ -30,7 +30,7 @@
3030
},
3131
"author": {
3232
"name": "Pavan Kumar Jadda",
33-
"email": "contactdeveloperpj@gmail.com"
33+
"email": "contact@pavankjadda.dev"
3434
},
3535
"keywords": [
3636
"react",

react-kit/src/lib/components/NextLink.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ import React from 'react';
22
import { Link as MuiLink } from '@mui/material';
33
import { Link } from 'react-router-dom';
44

5+
interface Props {
6+
href: string;
7+
linkText?: string;
8+
target?: string;
9+
children?: React.ReactNode;
10+
}
11+
512
/**
613
* Reusable custom Next.js 13 Link component.
714
*
@@ -10,7 +17,7 @@ import { Link } from 'react-router-dom';
1017
* @author Pavan Kumar Jadda
1118
* @since 0.3.2
1219
*/
13-
export function NextLink(props: { href: string; linkText?: string; target?: string; children?: React.ReactNode }): React.JSX.Element {
20+
export function NextLink(props: Readonly<Props>): React.JSX.Element {
1421
return (
1522
<MuiLink component={Link} to={props.href} className={'next-btn-link'} underline="hover">
1623
{props.linkText ?? props.children}

react-kit/src/lib/components/OpenInNewIconLink.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Icon, Link as MuiLink } from '@mui/material';
33
import React from 'react';
44
import { Link } from 'react-router-dom';
55

6-
interface OpenInNewIconLinkProps {
6+
interface Props {
77
href: string;
88
linkText: string;
99
target: string;
@@ -18,7 +18,7 @@ interface OpenInNewIconLinkProps {
1818
* @author Pavan Kumar Jadda
1919
* @since 1.2.24
2020
*/
21-
export function OpenInNewIconLink(props: OpenInNewIconLinkProps) {
21+
export function OpenInNewIconLink(props: Readonly<Props>) {
2222
return (
2323
<MuiLink
2424
component={Link}

react-kit/src/lib/components/buttons/EditIconButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface EditIconButtonProps {
88
color?: 'inherit' | 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
99
}
1010

11-
export function EditIconButton(props: EditIconButtonProps) {
11+
export function EditIconButton(props: Readonly<EditIconButtonProps>) {
1212
return (
1313
<Tooltip title={props.tooltipTitle}>
1414
<IconButton

tsconfig.base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"rootDir": ".",
55
"sourceMap": true,
66
"declaration": false,
7-
"moduleResolution": "node",
7+
"moduleResolution": "bundler",
88
"emitDecoratorMetadata": true,
99
"experimentalDecorators": true,
1010
"importHelpers": true,

0 commit comments

Comments
 (0)