nitrostack 1.0.3 → 1.0.5

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 CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  # Changelog
2
3
 
3
4
  All notable changes to NitroStack will be documented in this file.
@@ -7,6 +8,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
8
 
8
9
  ## [Unreleased]
9
10
 
11
+ ## [1.0.5] - 2025-10-27
12
+
13
+ ### Fixed
14
+ - **Critical**: Fixed webpack TypeScript loader for Studio `lib` and `components` directories
15
+ - Modified webpack exclude patterns to ensure TypeScript files in `lib/` and `components/` are processed
16
+ - Webpack now correctly applies the TypeScript/Babel loader to aliased paths
17
+ - Resolves "Module parse failed: Unexpected token" error for TypeScript syntax
18
+
19
+ ## [1.0.4] - 2025-10-27
20
+
21
+ ### Fixed
22
+ - **Critical**: Fixed Studio webpack module resolution for `@/*` path aliases
23
+ - Added explicit webpack configuration in `src/studio/next.config.js`
24
+ - Webpack now correctly resolves `@/lib/*` and `@/components/*` imports
25
+ - Resolves "Module not found: Can't resolve '@/lib/store'" error definitively
26
+ - Studio now works correctly when installed from npm
27
+
28
+ ### Technical Details
29
+ - The issue was that while TypeScript's `tsconfig.json` had `"paths": { "@/*": ["./"] }`, webpack (used by Next.js) wasn't respecting it
30
+ - Added explicit `config.resolve.alias = { '@': __dirname }` to webpack configuration
31
+ - This ensures webpack resolves `@/` to the Studio's root directory
32
+
10
33
  ## [1.0.3] - 2025-10-27
11
34
 
12
35
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nitrostack",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "NitroStack - Build powerful MCP servers with TypeScript",
5
5
  "type": "module",
6
6
  "main": "dist/core/index.js",
@@ -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,41 @@ 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
+
26
+ // Ensure TypeScript files are processed correctly
27
+ // Remove exclude patterns that might block our lib/components from being processed
28
+ config.module.rules.forEach((rule) => {
29
+ if (rule.test && rule.test.toString().includes('tsx')) {
30
+ // Remove node_modules exclude or modify it to allow our files
31
+ if (rule.exclude) {
32
+ const originalExclude = rule.exclude;
33
+ rule.exclude = (modulePath) => {
34
+ // Allow our lib and components directories
35
+ if (modulePath.includes(path.join(__dirname, 'lib')) ||
36
+ modulePath.includes(path.join(__dirname, 'components'))) {
37
+ return false;
38
+ }
39
+ // Apply original exclude logic
40
+ if (typeof originalExclude === 'function') {
41
+ return originalExclude(modulePath);
42
+ }
43
+ if (originalExclude instanceof RegExp) {
44
+ return originalExclude.test(modulePath);
45
+ }
46
+ return false;
47
+ };
48
+ }
49
+ }
50
+ });
51
+
52
+ return config;
53
+ },
13
54
  };
14
55
 
15
56
  export default nextConfig;