Skip to content

Commit b4a6eb2

Browse files
author
Shane Osbourne
committed
cwd usage
1 parent 5d403b9 commit b4a6eb2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/special-pages/index.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ import { join, relative } from 'node:path'
1515
import { existsSync, cpSync, rmSync, readFileSync, writeFileSync } from 'node:fs'
1616
import inliner from 'web-resource-inliner'
1717
import { buildSync } from 'esbuild'
18+
import { cwd } from '../../scripts/script-utils.js'
1819

19-
const CWD = new URL('.', import.meta.url).pathname
20-
const ROOT = new URL('../../', import.meta.url).pathname
20+
const CWD = cwd(import.meta.url);
21+
const ROOT = join(CWD, '../../')
2122
const BUILD = join(ROOT, 'build')
2223
const APPLE_BUILD = join(ROOT, 'Sources/ContentScopeScripts/dist')
2324
const NODE_ENV = JSON.stringify(process.env.NODE_ENV || 'development')

0 commit comments

Comments
 (0)