Closed gclark-eightfold closed 1 week ago
Need to bump node in .codesanbox dir
@gclark-eightfold You may be correct:
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 84.70%. Comparing base (
4eae06e
) to head (bf7e072
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Also removed this line and its import to fix the circular dep issue accross bundles:
https://github.com/EightfoldAI/octuple/blob/main/src/shared/utilities/flexGapSupported.ts#L7
SUMMARY:
Adds tree-shaking support for apps using Octuple. Core changes:
sideEffects
topackage.json
for CJS tree shaking.For the Webpack -> Rollup change, it may be possible to export ESM from webpack, but most sources I found said exporting ESM from webpack was not supported. Additionally, after examining quite a number of specifically react component libraries, it seemed like Rollup was the most common tool for this job.
Here is the bundle analysis diff in Blindfold.ai after following the steps outlined in the Test Plan
Before
After
GITHUB ISSUE (Open Source Contributors)
NA
JIRA TASK (Eightfold Employees Only):
ENG-55139
CHANGE TYPE:
TEST COVERAGE:
TEST PLAN:
.env
file. (If you have one already, just addANALYZE_BUNDLES=1
git checkout gclark/octuple-bundle-test
to pull these changes.pnpm install
. (Runnpm install -g pnpm
if you do not have pnpm installed)pnpm build --filter nextjs
to build the Blindfold app.apps/nextjs/.next/analyze/client.html
in your web browser.octuple.js
bundle present.pnpm start --filter nextjs
and go to http://localhost:8000/octuplepnpm patch-remove @eightfold.ai/octuple
pnpm build --filter nextjs
again.apps/nextjs/.next/analyze/client.html
in your web browser.octuple.js
bundle present.