mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-13 06:06:51 +00:00
Setup a `babel.config.js` in the root of the monorepo to be used by `packages/*`. It won't be used by some packages, e.g. `packages/embark-ui`, but most of them should use it instead of rolling their own. Allow for package-level modifications by specifying `babelrcRoots` in the root `babel.config.js` Use the babel `--root-mode upward` option in `packages/embark`'s `build` script. Other packages intending to use the common config should do likewise. Use a `.babelrc.js` in `packages/embark` to supply the package-specific `ignore` settings. Make packages used by the common config devDeps of the root. Extract babel-related devDeps from `packages/embark`, but don't extract the non-dev deps since those are used by embark's pipeline in a production install. Normally, it should only be necessary to have `@babel/cli` and `@babel/core` in devDeps, and possibly `@babel/runtime-corejs2` in deps, plus any package-specific babel-related dev/deps. Once we deprecate the pipeline, we can finish the extraction. Use `ncu -f '/babel/' -u` to bump the versions of all babel-related deps in the root and in `packages/embark`. We get better space/time savings from the yarn workspace when versions match.