-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build(merge-tree,sequence): Fix type generation for ESM and add exports field #18825
Conversation
⯆ @fluid-example/bundle-size-tests: -233.95 KB
Baseline commit: eb21fdd |
"./dist/test": { | ||
"import": { | ||
"types": "./dist/test/index.d.ts", | ||
"default": "./dist/test/index.cjs" | ||
}, | ||
"require": { | ||
"types": "./dist/test/index.d.ts", | ||
"default": "./dist/test/index.cjs" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"./dist/test": { | |
"import": { | |
"types": "./dist/test/index.d.ts", | |
"default": "./dist/test/index.cjs" | |
}, | |
"require": { | |
"types": "./dist/test/index.d.ts", | |
"default": "./dist/test/index.cjs" | |
} | |
} | |
"./dist/test": { | |
"types": "./dist/test/index.d.ts", | |
"default": "./dist/test/index.cjs" | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not going to risk changing it, though.
"default": "./dist/index.cjs" | ||
} | ||
}, | ||
"./dist/test": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to just call this ./test
? Would clean up some import patterns nicely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but in a future change, because doing that require more churn.
…ts field (microsoft#18825) This PR updates sequence and merge-tree to generate proper types in ESM builds and adds an exports field. I had to update the test files a bit to clean up imports. I also added a ./dist/test export from merge-tree since its internals are used by sequence tests. This is a demonstration of the mechanism we will have to use any time we want to export something for use in another package. No more reaching into internals! This PR includes some configuration and settings changes that are not strictly needed for this PR, but splitting them out doesn't seem worth the time since they're all needed for other pending PRs like microsoft#18823 and microsoft#18824.
…ts field (microsoft#18825) This PR updates sequence and merge-tree to generate proper types in ESM builds and adds an exports field. I had to update the test files a bit to clean up imports. I also added a ./dist/test export from merge-tree since its internals are used by sequence tests. This is a demonstration of the mechanism we will have to use any time we want to export something for use in another package. No more reaching into internals! This PR includes some configuration and settings changes that are not strictly needed for this PR, but splitting them out doesn't seem worth the time since they're all needed for other pending PRs like microsoft#18823 and
Ported PRs: - #18822 - #18825 ## Description Our partner team notified us of a 150kb increase in size when consuming `2.0.0-internal.8.0.0`. After an investigation into our bundle size telemetry, it was determined that these two commits in main had reduced the bundle size by about ~100kb. ## Impact Reduce bundle size by ~100kb. --------- Co-authored-by: Tyler Butler <tylerbu@microsoft.com>
Ported PRs: - #18822 - #18825 ## Description Our partner team notified us of a 150kb increase in size when consuming `2.0.0-internal.7.4.x`. After an investigation into our bundle size telemetry, it was determined that these two commits in main had reduced the bundle size by about ~100kb. ## Impact Reduce bundle size by ~100kb. --------- Co-authored-by: Tyler Butler <tylerbu@microsoft.com>
This PR updates sequence and merge-tree to generate proper types in ESM builds and adds an exports field. I had to update the test files a bit to clean up imports. I also added a ./dist/test export from merge-tree since its internals are used by sequence tests. This is a demonstration of the mechanism we will have to use any time we want to export something for use in another package. No more reaching into internals!
This PR includes some configuration and settings changes that are not strictly needed for this PR, but splitting them out doesn't seem worth the time since they're all needed for other pending PRs like #18823 and #18824.