-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
chore: improve dist size for N* #15331
Conversation
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. Latest deployment of this branch, based on commit 39d8aa5:
|
Perf AnalysisNo significant results to display. All results
Perf Analysis (Fluent)Perf comparison
Perf tests with no regressions
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 0af4f308c6f7da6a6c5e3796696e92d451a73919 (build) |
|
||
task( | ||
'bundle:package:types', | ||
series('bundle:package:types:tsc', 'bundle:package:types:copy', 'bundle:package:types:clean'), |
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.
Types should exist only under es
directory, this will remove temporary dts
directory after build.
.pipe(dest(paths.packageDist(packageName, 'commonjs'))), | ||
); | ||
|
||
task('bundle:package:es', () => | ||
src(componentsSrc) | ||
.pipe(sourcemaps.init()) | ||
.pipe(babel({ caller: { useESModules: true } } as any)) | ||
.pipe(sourcemaps.write('.')) | ||
.pipe(sourcemaps.write()) |
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.
Sourcemaps will be written inline, it saves from sourcemaps warnings.
This reverts commit 6d4e387.
warnings about sourcemaps
The basic Webpack setup was screaming about missing sourcemaps, now there are inlined so there it's not an issue anymore.
cleanup build
With @miroslavstastny we mentioned that artifacts published to NPM are too heavy.
dist
folder was not cleaned up properly (/*
does not work at least on Windows) so I was publishingprocessedIcons
folder that was removed a decade agodts
folder was also published however it's not required at allThe result is 31MB => 14MB on published artifacts for
@fluentui/react-northstar
, this should speed up install of packages on CodeSandbox.