Skip to content

Commit 26c1128

Browse files
committed
don't use npm link workaround unless opted in
1 parent 70501ec commit 26c1128

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/adapter/npm-link-workaround.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const WORKAROUND_REL_DIR = '.netlify/npm-link-workaround'
1010
// this is intentionally sync function so it works in every context without worrying about async
1111
export const workaroundNpmLinkOutsideOfProjectRoot = (filePath: string) => {
1212
const cwd = process.cwd()
13-
if (relative(cwd, filePath).startsWith('..')) {
13+
if (process.env.NETLIFY_NEXT_EXPERIMENTAL_ADAPTER && relative(cwd, filePath).startsWith('..')) {
1414
const workaroundDir = join(cwd, WORKAROUND_REL_DIR)
1515

1616
mkdirSync(workaroundDir, { recursive: true })

0 commit comments

Comments
 (0)