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
package/src/core/fiber-utils.ts
CHANGED
|
@@ -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
|
|