@webiny/project-utils
TypeScript icon, indicating that this package has built-in type declarations

5.39.5 • Public • Published

@webiny/project-utils

A collection of utilities for Webiny project.

If you've ever created a project using create-react-app you know its config is hidden from you unless you eject, which isn't really a good option because you won't receive any new updates they ship for react-scripts. Besides, react-sripts does not support monorepos. So the good people at rescripts created this tool to override react-scripts without ejecting 🎉 .

In each of your React apps setup by Webiny CLI, you will find a .rescriptsrc.js file which loads a Webiny rescript from @webiny/project-utils/cra (you can add more rescripts here if you like).

When running a build of your React app, we run rescripts (see package.json scripts), which intercepts the webpack config generated by react-scripts and allow you to modify it. In our rescript we enable babelrc files and also add all your monorepo packages to webpack's resolve.alias to make them accessible from your React app.

A quick overview of tools included in this package:

  • aliases - creates jest and webpack aliases.
  • cra - this is our rescript to get a CRA app to work as we want it to. Again, tweak it to your heart's content :)
  • packages - simply loads monorepo packages using get-yarn-workspaces package.

Readme

Keywords

none

Package Sidebar

Install

npm i @webiny/project-utils

Weekly Downloads

757

Version

5.39.5

License

MIT

Unpacked Size

150 kB

Total Files

69

Last publish

Collaborators

  • webiny