support loading config from a parent folder (monorepo)
See original GitHub issueHi @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:
https://github.com/egoist/tsup/blob/405e165ef7412adf54b9a83248144daa4c13be04/src/load.ts#L44-L55
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!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Can Eslint specify configuration under child package with ...
So the reason why ESLint is accessing an ".eslintrc.json" file located in a parent folder is simply because that is the default behaviour....
Read more >Config Files - Babel
New in Babel 7.x, Babel has a concept of a "root" directory, ... See the monorepo documentation for examples of how to use...
Read more >A Guide to Monorepos for Front-end Code - Toptal
A monorepository is a code management and architectural concept whereby you keep all your isolated bits of code in one super repository instead...
Read more >Visual Studio Code tips for monorepo development with Multi ...
Multi-root workspaces contain settings that work on a global level and can be overwritten with another settings.json inside its own project ...
Read more >Monorepo testing using jest projects - Orlando Bayo Adeyemi
Based on my monorepo's jest.config.js configuration above, jest looks for jest.config.js files in my packages directory and sets up the parent ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
🎉 This issue has been resolved in version 5.10.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
🎉 This issue has been resolved in version 5.12.7 🎉
The release is available on:
Your semantic-release bot 📦🚀