Skip to content

Commit 8b5b8b7

Browse files
fix: file paths missing .js extension for ESM (#365)
fix file paths
1 parent 4b4d881 commit 8b5b8b7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/create/src/file-helpers.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { basename, extname, resolve } from 'node:path'
44
import parseGitignore from 'parse-gitignore'
55
import ignore from 'ignore'
66

7-
import { hasDrive, stripDrive } from './utils'
8-
import type { Environment } from './types'
7+
import { hasDrive, stripDrive } from './utils.js'
8+
import type { Environment } from './types.js'
99

1010
const BINARY_EXTENSIONS = ['.png', '.jpg', '.jpeg', '.gif', '.svg', '.ico']
1111

@@ -232,10 +232,10 @@ const PROJECT_FILES = ['package.json']
232232
export function createIgnore(path: string, includeProjectFiles = true) {
233233
const ignoreList = existsSync(resolve(path, '.gitignore'))
234234
? (
235-
parseGitignore(
236-
readFileSync(resolve(path, '.gitignore')),
237-
) as unknown as { patterns: Array<string> }
238-
).patterns
235+
parseGitignore(
236+
readFileSync(resolve(path, '.gitignore')),
237+
) as unknown as { patterns: Array<string> }
238+
).patterns
239239
: []
240240
const ig = ignore().add(ignoreList)
241241
return (filePath: string) => {

0 commit comments

Comments
 (0)