Skip to content

Commit

Permalink
fix: make sure nextjs resolves chakra ui correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Pagebakers committed Aug 6, 2022
1 parent be064d7 commit f6ec7dc
Show file tree
Hide file tree
Showing 36 changed files with 79 additions and 42 deletions.
37 changes: 37 additions & 0 deletions .changeset/long-zebras-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
'@saas-ui/auth': minor
'@saas-ui/banner': minor
'@saas-ui/button': minor
'@saas-ui/card': minor
'@saas-ui/clerk': minor
'@saas-ui/data-table': minor
'@saas-ui/forms': minor
'@saas-ui/hooks': minor
'@saas-ui/hotkeys': minor
'@saas-ui/input-right-button': minor
'@saas-ui/layout': minor
'@saas-ui/list': minor
'@saas-ui/menu': minor
'@saas-ui/modals': minor
'@saas-ui/nprogress': minor
'@saas-ui/number-input': minor
'@saas-ui/palette': minor
'@saas-ui/password-input': minor
'@saas-ui/persona': minor
'@saas-ui/pin-input': minor
'@saas-ui/property': minor
'@saas-ui/provider': minor
'@saas-ui/radio': minor
'@saas-ui/react': minor
'@saas-ui/react-utils': minor
'@saas-ui/search-input': minor
'@saas-ui/select': minor
'@saas-ui/snackbar': minor
'@saas-ui/stepper': minor
'@saas-ui/system': minor
'@saas-ui/theme': minor
'@saas-ui/web3': minor
'@saas-ui/next-workspaces': minor
---

Fixed issue where Next.js would not resolve Chakra UI components correctly.
6 changes: 3 additions & 3 deletions packages/saas-ui-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./services/supabase": {
"require": "./dist/supabase.js",
"default": "./dist/supabase.modern.mjs"
"import": "./dist/supabase.modern.mjs"
},
"./services/magic-link": {
"require": "./dist/magic-link.js",
"default": "./dist/magic-link.modern.mjs"
"import": "./dist/magic-link.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-banner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-card/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-clerk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"source": "src/index.ts",
"exports": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"main": "./dist/index.js",
"module": "./dist/index.modern.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-data-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
8 changes: 4 additions & 4 deletions packages/saas-ui-forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
},
"./yup": {
"require": "./dist/yup/index.js",
"default": "./dist/yup/index.modern.mjs"
"import": "./dist/yup/index.modern.mjs"
},
"./yup/src": {
"default": "./yup/src/index.ts"
},
"./zod": {
"require": "./dist/zod/index.js",
"default": "./dist/zod/index.modern.mjs"
"import": "./dist/zod/index.modern.mjs"
},
"./zod/src": {
"default": "./zod/src/index.ts"
},
"./ajv": {
"require": "./dist/ajv/index.js",
"default": "./dist/ajv/index.modern.mjs"
"import": "./dist/ajv/index.modern.mjs"
},
"./ajv/src": {
"default": "./ajv/src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-hotkeys/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-input-right-button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-layout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-menu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-modals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-nprogress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-number-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-palette/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-password-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-persona/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-pin-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-property/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-radio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-react-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-search-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-select/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-snackbar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-stepper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/saas-ui-web3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"exports": {
".": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"./src": {
"default": "./src/index.ts"
Expand Down
6 changes: 3 additions & 3 deletions templates/package/base/templates/package.json.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ to: "<%= h.packageDir(org, name) %>/package.json"
"type": "module",
"exports": {
"require": "./dist/index.cjs",
"default": "./dist/index.esm.js"
"import": "./dist/index.modern.mjs"
},
"main": "./dist/index.cjs",
"module": "./dist/index.esm.js",
"module": "./dist/index.modern.mjs",
"types": "./dist/index.d.ts",
"scripts": {
"prebuild": "rimraf dist",
"build": "microbundle --tsconfig ./tsconfig.json -f cjs,es --compress",
"build": "microbundle --tsconfig ./tsconfig.json -f cjs,modern --compress",
"lint": "eslint src --ext .ts,.tsx,.js,.jsx --config ../../.eslintrc.js",
"lint:staged": "lint-staged --allow-empty --config ../../lint-staged.config.js",
"typecheck": "tsc --noEmit"
Expand Down
2 changes: 1 addition & 1 deletion templates/package/react-component/templates/package.json.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ to: "<%= h.packageDir(org, name) %>/package.json"
"source": "src/index.ts",
"exports": {
"require": "./dist/index.js",
"default": "./dist/index.modern.mjs"
"import": "./dist/index.modern.mjs"
},
"main": "./dist/index.js",
"module": "./dist/index.modern.mjs",
Expand Down
2 changes: 1 addition & 1 deletion tooling/next-workspaces/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Assuming you are using Typescript, it will look something like this:
"exports": {
"require": "./dist/index.cjs",
"development": "./src/index.ts", // This tells webpack to import the source files
"default": "./dist/index.esm.js"
"import": "./dist/index.esm.mjs"
},
"main": "./dist/index.cjs",
"module": "./dist/index.esm.js",
Expand Down

0 comments on commit f6ec7dc

Please sign in to comment.