react-spot 0.0.3 → 0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-spot",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Dev-only DOM to React source opener for React 19, Next.js, and Turbopack.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -145,6 +145,10 @@ const INTERNAL_PATH_KEYWORDS = [
145
145
  'webpack-internal',
146
146
  'turbopack-ecmascript-runtime',
147
147
  '__turbopack_',
148
+ '[turbopack]',
149
+ 'turbopack:',
150
+ 'hmr-runtime',
151
+ 'hot-reloader',
148
152
  ];
149
153
 
150
154
  /**
@@ -821,11 +821,19 @@ export function isRuntimeSource(source: string): boolean {
821
821
  if (source.includes('node_modules/.pnpm/')) return true;
822
822
 
823
823
  // node_modules 内部的包源码(排除直接 symlink 到 workspace 的情况)
824
- // 匹配模式:node_modules/<pkg>/src/ 或 node_modules/<pkg>/dist/ 等
825
824
  if (source.includes('/node_modules/') && !isWorkspaceLinkedPath(source)) {
826
825
  return true;
827
826
  }
828
827
 
828
+ // Turbopack / webpack 打包器内部运行时文件
829
+ // source map 有时会映射到这些 bundler 内部模块,它们不在磁盘上存在
830
+ if (source.includes('[turbopack]') || source.includes('turbopack:')) return true;
831
+ if (source.includes('[webpack]') || source.includes('webpack-internal:')) return true;
832
+
833
+ // Next.js 构建输出目录中的文件(_next/static/chunks/ 等),
834
+ // 这些是编译产物而非用户源码
835
+ if (source.includes('/_next/static/') || source.includes('/.next/')) return true;
836
+
829
837
  return false;
830
838
  }
831
839