Skip to content

Commit 98e1b31

Browse files
fix relative import
1 parent b8d32f4 commit 98e1b31

File tree

1 file changed

+2
-2
lines changed
  • packages/next-swc/crates/next-core/src

1 file changed

+2
-2
lines changed

packages/next-swc/crates/next-core/src/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,9 @@ pub async fn load_next_js_template(
420420
.get_relative_path_to(&imported)
421421
.context("path has to be relative to package root")?;
422422

423-
if !relative.starts_with("next/") {
423+
if !relative.starts_with("./next/") {
424424
bail!(
425-
"Invariant: Expected relative import to start with \"next/\", found \"{}\"",
425+
"Invariant: Expected relative import to start with \"./next/\", found \"{}\"",
426426
relative
427427
)
428428
}

0 commit comments

Comments
 (0)