## Description
This PR "swaps" the guiding principle behind what options are in the
base `tsconfig.json`.
Previously TS was configured to *not* emit declarations and we were
forcing for them to be emitted with CLI flags. This had an unfortunate
result - errors about "not portable type definitions" were not displayed
in the IDE because to its best knowledge the type definitions were never
supposed to be emitted. So it wasn't worthwhile to surface this error.
With the adjusted options those errors will be raised in the IDE which
should improve the feedback loop for those errors.
## Code Review
- [ ] hi @TrySound, @istarkov, @kof - you need to recheck if you have
any doubts about this approach, if you see anything wrong with it in the
context of this project
## Before merging
- [ ] test IDE setup
- [ ] test build script
- [ ] test typechecking and dts emit
- got rid of unused esbuild-node-externals package
- removed esbuild override/resolution to old version
- deduplicateed webpack 4 and 5 into single 4 instance
- upgraded esbuild to the latest version with "context" api instead of
incremental flag which potentially forces to fix the issue with remix
once they upgrade
Esbuild bump fixed the issue with remix going infinite watch loop after
any changes in packages and looks like esbuild in remix no longer blocks
parallel turbo run!!!
## Description
1. What is this PR about (link the issue and add a short description)
## Steps for reproduction
1. click button
2. expect xyz
## Code Review
- [ ] hi @kof, I need you to do
- conceptual review (architecture, feature-correctness)
- detailed review (read every line)
- test it on preview
## Before requesting a review
- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")
## Before merging
- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
- all workspace dependencies are use with `workspace:^` protocol which
on publish is replaced with `^VERSION`. This will let us to upgrade
transitive packages in saas without shaman dancing around package.json
and lockfile.
- publish-to-npm script is replaced with `pnpm -r publish` which
recursively publishes all packages if version does not exist in npm
- dropped yarn lockfile
While migrating to pnpm I got an issue with our extends relying on
node_modules. pnpm have only symlinks and do not have hoisted
node_modules in the root.
Here I switched extends to package name as all tools can resolve it and
tweaked remix tsconfig to extend from packages folder instead of
node_modules.
Build of whole monorepo without cache takes 1min or more on my laptop.
tsc is very slow tool for this. Also having rootDir in tsconfig prevents
checking outside of src folder.
Here I added "scripts" package with "build-package" bin. It does both
esm and cjs builds. --watch flag support completely replaces tsup for
us.
Now full rebuild of monorepo without cache takes only 10s including
prisma-client, http-client and designer builds.