monorepo-example
monorepo-example copied to clipboard
Move common config files to root
Typescript and jest config files are very similar between the packages. Move them to root and extend them in the packages.
Figure a way to:
- [ ] have a nice output when executing tests from root
- [ ] the possibility to execute tests from inside a package
thank you for your great example. I stumbled across it looking for a solution why my tests fail, when they reference to a other package. My solution, with jest as a test runner, was to use ```
moduleNameMapper: {
'@foo': '<rootDir>/../../packages/foo/src/'
}
https://jestjs.io/docs/en/configuration.html#modulenamemapper-objectstring-string--arraystring
Hope this may help people coming across here too. It enabled me to run tests within a package or on root level, without having to build sources beforehand