-
-
Notifications
You must be signed in to change notification settings - Fork 265
Closed
Labels
Description
Hi @egoist!
My project structure has:
+-- project
+-- packages
| +-- library
+-- tsup.config.ts
When I call tsup from the library folder, it fails to find the config file. I see you're setting joycon's stopDir to the current project's folder:
Lines 44 to 55 in 405e165
| const configPath = await configJoycon.resolve( | |
| [ | |
| 'tsup.config.ts', | |
| 'tsup.config.js', | |
| 'tsup.config.cjs', | |
| 'tsup.config.mjs', | |
| 'tsup.config.json', | |
| 'package.json', | |
| ], | |
| cwd, | |
| path.dirname(cwd) | |
| ) |
Would you have any objection to changing that and allow resolve() to traverse the filesystem upward?
export async function loadTsupConfig(cwd: string) {
const configJoycon = new JoyCon()
const configPath = await configJoycon.resolve(
[
'tsup.config.ts',
'tsup.config.js',
'tsup.config.cjs',
'tsup.config.mjs',
'tsup.config.json',
'package.json',
],
- cwd,
- path.dirname(cwd)
+ cwd
)Thanks!
jcarty-nydig and laozhu