sdu-react-scripts-product-site 1.0.1
Install from the command line:
Learn more about npm packages
$ npm install @elseu/sdu-react-scripts-product-site@1.0.1
Install via package.json:
"@elseu/sdu-react-scripts-product-site": "1.0.1"
About this version
This package contains utility scripts for sdu-titan-product-site
.
npm install -D @elseu/sdu-react-scripts-product-site
Symlink a package from another directory for easier local development.
npx npx sdu-react-scripts-product-site-setup-linked-packages
This will bring up a prompt, just enter the package you want to symlink and it will handle the necessary steps for you.
Node scripts to calculate and compare Next.js bundles by size. Intended to be used in CI, but can also be used locally. They are written with Sdu Titan Product Site in mind, but could in theory be made more generic to fit other Next.js projects.
Make sure your dependencies are installed, then run the following commands directly or configure them in your package.json
.
First create a Next.js build.
ANALYZE=true NODE_ENV=production next build
Then, to analyze.
npx sdu-react-scripts-product-site-analyze-bundle-size
This will produce a bundle.json
. You can then input two of these files (e.g. from different branches), along with an accepted size difference threshold into the comparison script to get a report of the size differential.
npx sdu-react-scripts-product-site-compare-bundle-size $CURRENT_BUNDLE $BENCHMARK_BUNDLE $BENCHMARK_BRANCH_NAME $THRESHOLD