@optifye/dashboard-core 2.0.3 → 2.0.4

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.
Files changed (2) hide show
  1. package/README.md +16 -0
  2. package/package.json +5 -3
package/README.md CHANGED
@@ -189,6 +189,22 @@ This CSS file includes:
189
189
 
190
190
  **Note:** You do NOT need to separately import `react-day-picker/dist/style.css` as these styles are already included in the package's global CSS.
191
191
 
192
+ ## Troubleshooting
193
+
194
+ ### Next.js Module Resolution Error
195
+
196
+ If you encounter an error like:
197
+ ```
198
+ Error: Cannot find module 'next/router' imported from node_modules/@optifye/dashboard-core/dist/index.mjs
199
+ ```
200
+
201
+ This package is designed to be used within a Next.js application with proper bundler configuration. Make sure:
202
+ 1. You're importing this package within a Next.js application
203
+ 2. Your Next.js configuration is set up correctly
204
+ 3. You're not trying to import this package in a pure Node.js ESM environment
205
+
206
+ If you're using this package in a custom setup, ensure your bundler is configured to handle Next.js module resolution.
207
+
192
208
  ## Integration Guide
193
209
 
194
210
  ### Basic Setup
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optifye/dashboard-core",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "Reusable UI & logic for Optifye dashboard",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -15,8 +15,10 @@
15
15
  "exports": {
16
16
  ".": {
17
17
  "types": "./dist/index.d.ts",
18
- "import": "./dist/index.mjs",
19
- "require": "./dist/index.js"
18
+ "node": "./dist/index.js",
19
+ "import": "./dist/index.js",
20
+ "require": "./dist/index.js",
21
+ "default": "./dist/index.js"
20
22
  },
21
23
  "./global.css": "./global.css"
22
24
  },