Skip to content

Commit a1c075b

Browse files
test: drop fallback for import.meta.dirname in example code (#2781)
I was following this example in our internal repo and Greptile caught this error -- we were using dirname without importing it. That fallback seems to be only for Node 19 and below so it should be safe to drop it ### Changes are visible to end-users: no ### Test plan - Covered by existing test cases Co-authored-by: Tyler Breisacher <matrixfrog@gmail.com>
1 parent 2d7fa88 commit a1c075b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

examples/nextjs/next.standalone.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import { join } from 'node:path'
22

3-
const appDir = import.meta.dirname || dirname(fileURLToPath(import.meta.url))
4-
53
// Must include the parent .aspect_rules_js package store when tracing for standalone output
6-
const outputFileTracingRoot = join(appDir, '../../')
4+
const outputFileTracingRoot = join(import.meta.dirname, '../../')
75

86
/** @type {import('next').NextConfig} */
97
const nextConfig = {

0 commit comments

Comments
 (0)