Skip to content

Commit 2b7ca40

Browse files
committed
fix bug and test cases
1 parent d67dde0 commit 2b7ca40

File tree

6 files changed

+14
-6
lines changed

6 files changed

+14
-6
lines changed

crates/napi/src/next_api/project.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ pub async fn project_trace_source(
11451145
(
11461146
get_relative_path_to(
11471147
&current_directory_file_url,
1148-
&format!("{}/{}", project_root_uri, source_file),
1148+
&format!("{}{}", project_root_uri, source_file),
11491149
)
11501150
// TODO(sokra) remove this to include a ./ here to make it a relative path
11511151
.trim_start_matches("./")

test/e2e/app-dir/non-root-project-monorepo/apps/web/app/monorepo-package-rsc/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { text } from 'my-package/typescript.ts'
1+
import { text } from 'my-package/typescript'
22

33
export default function Page() {
44
return <p>{text}</p>

test/e2e/app-dir/non-root-project-monorepo/apps/web/app/monorepo-package-ssr/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client'
22

3-
import { text } from 'my-package/typescript.ts'
3+
import { text } from 'my-package/typescript'
44

55
export default function Page() {
66
return <p>{text}</p>

test/e2e/app-dir/non-root-project-monorepo/apps/web/app/source-maps-rsc/page.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
export default async function Page({ searchParams }) {
2-
innerFunction()
2+
// We don't want the build to fail in production
3+
if (process.env.NODE_ENV === 'development') {
4+
innerFunction()
5+
}
6+
return <p>Hello Source Maps</p>
37
}
48

59
function innerFunction() {

test/e2e/app-dir/non-root-project-monorepo/apps/web/app/source-maps-ssr/page.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
'use client'
22

33
export default function Page() {
4-
innerFunction()
4+
// We don't want the build to fail in production
5+
if (process.env.NODE_ENV === 'development') {
6+
innerFunction()
7+
}
8+
return <p>Hello Source Maps</p>
59
}
610

711
function innerFunction() {

test/integration/css-minify/test/index.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function runTests() {
2525
"/* [project]/test/integration/css-minify/styles/global.css [client] (css) */
2626
.a{--var-1:0;--var-2:0;--var-1:-50%;--var-2:-50%}.b{--var-1:0;--var-2:0;--var-2:-50%}
2727
28-
/*# sourceMappingURL=styles_global_411632.css.map*/
28+
/*# sourceMappingURL=test_integration_css-minify_styles_global_411632.css.map*/
2929
"
3030
`)
3131
} else {

0 commit comments

Comments
 (0)