nitrostack 1.0.2 → 1.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.
- package/CHANGELOG.md +22 -0
- package/package.json +1 -1
- package/src/studio/next.config.js +14 -0
- package/src/studio/tsconfig.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.0.4] - 2025-10-27
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Critical**: Fixed Studio webpack module resolution for `@/*` path aliases
|
|
14
|
+
- Added explicit webpack configuration in `src/studio/next.config.js`
|
|
15
|
+
- Webpack now correctly resolves `@/lib/*` and `@/components/*` imports
|
|
16
|
+
- Resolves "Module not found: Can't resolve '@/lib/store'" error definitively
|
|
17
|
+
- Studio now works correctly when installed from npm
|
|
18
|
+
|
|
19
|
+
### Technical Details
|
|
20
|
+
- The issue was that while TypeScript's `tsconfig.json` had `"paths": { "@/*": ["./"] }`, webpack (used by Next.js) wasn't respecting it
|
|
21
|
+
- Added explicit `config.resolve.alias = { '@': __dirname }` to webpack configuration
|
|
22
|
+
- This ensures webpack resolves `@/` to the Studio's root directory
|
|
23
|
+
|
|
24
|
+
## [1.0.3] - 2025-10-27
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
- **Critical**: Fixed Studio TypeScript path resolution in Next.js webpack
|
|
28
|
+
- Changed `moduleResolution` from `"bundler"` to `"node"` in `src/studio/tsconfig.json`
|
|
29
|
+
- Added `"baseUrl": "."` to enable proper `@/*` path mapping
|
|
30
|
+
- Resolves "Module not found: Can't resolve '@/lib/store'" error when running `nitrostack dev`
|
|
31
|
+
|
|
10
32
|
## [1.0.2] - 2025-10-27
|
|
11
33
|
|
|
12
34
|
### Fixed
|
package/package.json
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
3
|
+
|
|
4
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
5
|
+
const __dirname = path.dirname(__filename);
|
|
6
|
+
|
|
1
7
|
/** @type {import('next').NextConfig} */
|
|
2
8
|
const nextConfig = {
|
|
3
9
|
// No static export in dev mode - we need API routes and middleware
|
|
@@ -10,6 +16,14 @@ const nextConfig = {
|
|
|
10
16
|
eslint: {
|
|
11
17
|
ignoreDuringBuilds: true,
|
|
12
18
|
},
|
|
19
|
+
webpack: (config) => {
|
|
20
|
+
// Explicitly configure webpack to resolve @ alias
|
|
21
|
+
config.resolve.alias = {
|
|
22
|
+
...config.resolve.alias,
|
|
23
|
+
'@': __dirname,
|
|
24
|
+
};
|
|
25
|
+
return config;
|
|
26
|
+
},
|
|
13
27
|
};
|
|
14
28
|
|
|
15
29
|
export default nextConfig;
|
package/src/studio/tsconfig.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"noEmit": true,
|
|
13
13
|
"esModuleInterop": true,
|
|
14
14
|
"module": "esnext",
|
|
15
|
-
"moduleResolution": "
|
|
15
|
+
"moduleResolution": "node",
|
|
16
16
|
"resolveJsonModule": true,
|
|
17
17
|
"isolatedModules": true,
|
|
18
18
|
"jsx": "preserve",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"@/*": [
|
|
27
27
|
"./*"
|
|
28
28
|
]
|
|
29
|
-
}
|
|
29
|
+
},
|
|
30
|
+
"baseUrl": "."
|
|
30
31
|
},
|
|
31
32
|
"include": [
|
|
32
33
|
"next-env.d.ts",
|