Sam Frampton
04/19/2022, 8:43 PMSam Frampton
04/19/2022, 8:44 PM---------
- have a feeling I may be missing something on my side.Frank
@outflo/types
is another package in the workspace?Omi Chowdhury
04/19/2022, 8:53 PMOmi Chowdhury
04/19/2022, 8:54 PMSam Frampton
04/19/2022, 9:04 PMSam Frampton
04/19/2022, 9:05 PMSam Frampton
04/19/2022, 9:11 PMOmi Chowdhury
04/19/2022, 9:12 PMlibs/
cool-shared-utils/
package.json <-- #1
index.ts
sst/
sst.json
package.json <-- #2
index.ts <-- sst's index.json
stacks/
auth.ts <-- uses to src: "code/auth-handlers/..."
user.ts
code/
auth-handlers/
login.ts
logout.ts
package.json <-- #3
user-handlers/
create.ts
delete.ts
package.json <-- #4
#3 and #4 have a dependency on #1, but not #2
(I need to have this in a snippet or something)Omi Chowdhury
04/19/2022, 9:14 PMOmi Chowdhury
04/19/2022, 9:16 PMSam Frampton
04/19/2022, 9:22 PMsst.json
at the root level.
sst.json
package.json // workspace dependencies
yarn.lock
seed.yml
tsconfig.json
lerna.json
scripts/
workspace/ => lerna cmds
packages/ => package level
stacks/
service1Stack.ts
service2Stack.ts
service3Stack.ts
....
packages/
service1/
tsconfig
package.json
.eslintrc
src/
core/
routes/ => // file imported to stack routes
types/
service2/
service3/
....
Sam Frampton
04/27/2022, 9:11 PM"paths": {
"@outflo/types": ["../../types"]
}
I also needed to update jest config as jest won't read tsconfig paths
moduleNameMapper: {
'^@outflo/types$': '<rootDir>/../../types'
},