nitrostack 1.0.6 → 1.0.7
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 +13 -0
- package/package.json +1 -1
- package/src/studio/next.config.js +6 -16
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [1.0.7] - 2025-10-27
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- **Critical**: Fixed webpack loader configuration error for Studio
|
|
15
|
+
- Switched from manual `next-swc-loader` configuration to Next.js's `defaultLoaders.babel`
|
|
16
|
+
- Resolves "TypeError [ERR_INVALID_ARG_TYPE]: The 'from' argument must be of type string" error
|
|
17
|
+
- Uses Next.js's pre-configured loader with all correct options
|
|
18
|
+
|
|
19
|
+
### Technical Details
|
|
20
|
+
- Previous manual loader configuration was passing incorrect options to `next-swc-loader`
|
|
21
|
+
- New approach: use `defaultLoaders.babel` provided by Next.js webpack context
|
|
22
|
+
- This ensures all TypeScript/JSX files in `lib/` and `components/` are processed with the correct Babel/SWC configuration
|
|
23
|
+
|
|
11
24
|
## [1.0.6] - 2025-10-27
|
|
12
25
|
|
|
13
26
|
### Fixed
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ const nextConfig = {
|
|
|
16
16
|
eslint: {
|
|
17
17
|
ignoreDuringBuilds: true,
|
|
18
18
|
},
|
|
19
|
-
webpack: (config, { isServer }) => {
|
|
19
|
+
webpack: (config, { defaultLoaders, isServer }) => {
|
|
20
20
|
// Explicitly configure webpack to resolve @ alias
|
|
21
21
|
config.resolve.alias = {
|
|
22
22
|
...config.resolve.alias,
|
|
@@ -24,25 +24,15 @@ const nextConfig = {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
// Ensure our lib and components directories are included in compilation
|
|
27
|
-
//
|
|
28
|
-
const libPath = path.
|
|
29
|
-
const componentsPath = path.
|
|
27
|
+
// Use Next.js's default TypeScript loader
|
|
28
|
+
const libPath = path.resolve(__dirname, 'lib');
|
|
29
|
+
const componentsPath = path.resolve(__dirname, 'components');
|
|
30
30
|
|
|
31
|
-
// Add a
|
|
31
|
+
// Add a rule for our TypeScript files using Next.js's default loader
|
|
32
32
|
config.module.rules.push({
|
|
33
33
|
test: /\.(ts|tsx)$/,
|
|
34
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
|
-
],
|
|
35
|
+
use: defaultLoaders.babel,
|
|
46
36
|
});
|
|
47
37
|
|
|
48
38
|
return config;
|