You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ref(build): Add central build directory to packages without CDN bundles (Part 1) (#4854)
This PR is part 1 of adding the `build` directory to packages _without_ CDN bundles. It is split into two parts to make reviewing easier. It covers the following packages:
* Core
* Gatsby
* Hub
* Minimal
Additionally, it adjusts `prepack.ts` to handle both kinds of packages (with/without CDN bundles) via a CL argument. For the Gatsby SDK, additional actions have to be performed which are only relevant for this package. Therefore, `prepack.ts` now supports calling a package-specific `prepack.ts` file located in `<package>/scripts/prepack.ts`.
While the tarball structure is identical to the structure in #4838 (except for temporary CDN bundles), the `build` directory structure is simplified due to the fact that there are no CDN bundles or legacy NPM packages to be added to it. Therefore we can reduce one hierarchy level, resulting in the following structure:
```
<sdk>/
├─ build/
│ ├─ cjs/ // dist until v7
│ │ ├─ CJS modules (+maps)
│ ├─ esm/
│ │ ├─ ES6 modules (+maps)
│ ├─ types/
│ │ ├─ *.d.ts files (+maps)
│ ├─ package.json
│ ├─ LICENSE
│ ├─ README.md
├─ ...
```
Co-authored-by: Abhijeet Prasad <[email protected]>
0 commit comments