nitrostack 1.0.4 → 1.0.6
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 +23 -0
- package/package.json +1 -1
- package/src/studio/next.config.js +24 -1
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.6] - 2025-10-27
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- **Critical**: Added explicit webpack rule for Studio TypeScript compilation
|
|
15
|
+
- Created dedicated webpack rule with `next-swc-loader` for `lib/` and `components/` directories
|
|
16
|
+
- Uses `include` directive to explicitly process TypeScript files in these directories
|
|
17
|
+
- Resolves "Module parse failed: Unexpected token" by ensuring proper TypeScript compilation
|
|
18
|
+
- Works correctly when Studio is installed from npm in `node_modules`
|
|
19
|
+
|
|
20
|
+
### Technical Details
|
|
21
|
+
- Previous approach of modifying `exclude` patterns wasn't working consistently
|
|
22
|
+
- New approach: explicitly `push` a new webpack rule that includes our directories
|
|
23
|
+
- Uses Next.js's internal `next-swc-loader` with proper configuration for both client and server builds
|
|
24
|
+
|
|
25
|
+
## [1.0.5] - 2025-10-27
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
- **Critical**: Fixed webpack TypeScript loader for Studio `lib` and `components` directories
|
|
29
|
+
- Modified webpack exclude patterns to ensure TypeScript files in `lib/` and `components/` are processed
|
|
30
|
+
- Webpack now correctly applies the TypeScript/Babel loader to aliased paths
|
|
31
|
+
- Resolves "Module parse failed: Unexpected token" error for TypeScript syntax
|
|
32
|
+
|
|
10
33
|
## [1.0.4] - 2025-10-27
|
|
11
34
|
|
|
12
35
|
### Fixed
|
package/package.json
CHANGED
|
@@ -16,12 +16,35 @@ const nextConfig = {
|
|
|
16
16
|
eslint: {
|
|
17
17
|
ignoreDuringBuilds: true,
|
|
18
18
|
},
|
|
19
|
-
webpack: (config) => {
|
|
19
|
+
webpack: (config, { isServer }) => {
|
|
20
20
|
// Explicitly configure webpack to resolve @ alias
|
|
21
21
|
config.resolve.alias = {
|
|
22
22
|
...config.resolve.alias,
|
|
23
23
|
'@': __dirname,
|
|
24
24
|
};
|
|
25
|
+
|
|
26
|
+
// Ensure our lib and components directories are included in compilation
|
|
27
|
+
// This is needed when Studio is running from node_modules
|
|
28
|
+
const libPath = path.join(__dirname, 'lib');
|
|
29
|
+
const componentsPath = path.join(__dirname, 'components');
|
|
30
|
+
|
|
31
|
+
// Add a new rule specifically for our TypeScript files
|
|
32
|
+
config.module.rules.push({
|
|
33
|
+
test: /\.(ts|tsx)$/,
|
|
34
|
+
include: [libPath, componentsPath],
|
|
35
|
+
use: [
|
|
36
|
+
{
|
|
37
|
+
loader: 'next-swc-loader',
|
|
38
|
+
options: {
|
|
39
|
+
isServer,
|
|
40
|
+
pagesDir: path.join(__dirname, 'app'),
|
|
41
|
+
appDir: path.join(__dirname, 'app'),
|
|
42
|
+
hasReactRefresh: !isServer,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
});
|
|
47
|
+
|
|
25
48
|
return config;
|
|
26
49
|
},
|
|
27
50
|
};
|