Skip to content

agilgur5/rpt2-issue-454

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typescript project references with rollup problems

Rollup Typescript2 example for reproduce problem with typescript project references

Why rollup-typescript2? — because @rollup/plugin-typescript doesn't support typescript project references
Why you need SDK project — in this example, sdk - externalized project. But it also dogfooded from local project frontend
Why you need shared project — because it shared with backend, frontend, and sdk. It shared project with some models and internals. Optimize backend compilation speed and avoid direct sdk usage in backend \

Problem 1 — typings with project references

  1. Run npm run -w @project/sdk rollup
  2. See build/sdk and build/shared directories
    tree packages/sdk/build/shared
    packages/sdk/build/shared
    └── src
        └── test
            ├── util.d.ts
            └── util.d.ts.map
    
    tree packages/sdk/build/sdk
    packages/sdk/build/sdk
    └── src
        ├── actions
        │   ├── create.d.ts
        │   └── create.d.ts.map
        └── models
            ├── user.d.ts
            └── user.d.ts.map
    
    
    
    It contains types with SRC directory
  3. Run npm run -w @project/sdk build and as a result - all typing located in actions and models directories. Additional sdk and shared dirs didn't create

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages

  • JavaScript 76.1%
  • TypeScript 23.9%