Skip to content

Commit c712302

Browse files
committed
fix: avoid using import.meta.dirname; fixes Node.js 18 compatibility
Closes #729 The bug is again related to the CLI code rather than the template - we need to refactor the CI workflow to test the CLI code in all environments.
1 parent 12b59fe commit c712302

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { trimBoilerplate, removeCSSImport, emptyRouterConfig } from './utils/tri
2121

2222
import cliPackageJson from './package.json'
2323

24-
const language = await getLanguage(path.resolve(import.meta.dirname, 'locales'))
24+
const language = await getLanguage(fileURLToPath(new URL('./locales', import.meta.url)))
2525

2626
const FEATURE_FLAGS = [
2727
'default',

0 commit comments

Comments
 (0)