Skip to content
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

Investigate on new bundler #3601

Closed
netil opened this issue Jan 16, 2024 · 2 comments · May be fixed by gti-sos/SOS2324-21#87
Closed

Investigate on new bundler #3601

netil opened this issue Jan 16, 2024 · 2 comments · May be fixed by gti-sos/SOS2324-21#87
Assignees
Labels
build Build or distribution file related enhancement

Comments

@netil
Copy link
Member

netil commented Jan 16, 2024

Description

webpack works fine, but there're new bundlers in ecosystem which focusing on performance.
Look for the possibility to migrate rust based bundler to boost bundling task.

  • Some consideration & candidates
    • Adopt esbuild-loader
      • Pros: easy adoption and continues staying and use webpack configurations
      • Cons: Isn't full migration.
    • Vite, ebuild, etc.
@netil netil added enhancement build Build or distribution file related labels Jan 16, 2024
@netil netil self-assigned this Jan 16, 2024
@netil
Copy link
Member Author

netil commented Mar 4, 2024

Main changes derived will be the minimum specification support is es6.
This means, will drop the support of es5.

netil pushed a commit to netil/billboard.js that referenced this issue Mar 4, 2024
- Migrate transpiler: babel -> esbuild
- Update related plugins: css-minimizer-webpack-plugin, terser-webpack-plugin -> esbuild built-in

Ref naver#3601
netil pushed a commit to netil/billboard.js that referenced this issue Mar 6, 2024
- Migrate transpiler: babel -> esbuild
- Update related plugins: css-minimizer-webpack-plugin, terser-webpack-plugin -> esbuild built-in

Ref naver#3601
@netil
Copy link
Member Author

netil commented Mar 8, 2024

Here's results of migration from Babel → esbuild (esbuild-loader).
The migration will make drop the support of ES5 transpilation on distribution files.

Summary

a) Tasks

Task weback + babel weback + esbuild-loader Diff rate
build 36.614s 17.508s -52.18%
build w/o ESM build 27.862s 9.482s -65.96%
Dependency packages Removed: 32 Added: 1 -96.875%
Detailed packages @babel/core
@babel/eslint-parser
@babel/plugin-proposal-class-properties
@babel/plugin-proposal-object-rest-spread
@babel/plugin-transform-runtime
@babel/preset-env
@babel/preset-typescript
@babel/runtime
@rollup/plugin-babel
babel-helper-modules
babel-loader
babel-plugin-add-module-exports
babel-plugin-minify-constant-folding
babel-plugin-minify-dead-code-elimination
babel-plugin-minify-guarded-expressions
babel-plugin-minify-numeric-literals
babel-plugin-minify-type-constructors
babel-plugin-transform-inline-consecutive-adds
babel-plugin-transform-merge-sibling-variables
babel-plugin-transform-minify-booleans
css-minimizer-webpack-plugin
terser-webpack-plugin
esbuild-loader

b) Build size

Files Babel esbuild Rate diff
billboard.js 901kb 735kb -18.42%
billboard.min.js 285kb 247kb -13.33%
billboard.pkgd.js 1.8mb 1.6mb -11.11%
billboard.pkgd.min.js 601kb 546kb -9.15%

Details

Time measurement on build

Attemps Babel Babel w/o ESM build esbuild esbuild w/o ESM build
1 36.59s 27.94s 17.48s 10.07s
2 34.38s 27.48s 17.16s 9.19s
3 38.43s 27.63s 17.46s 9.53s
4 36.78s 28.78s 17.69s 9.28s
5 36.89s 27.48s 17.75s 9.34s
Avg 36.614s 27.862s 17.508s (-52.18%*) 9.482s (-65.96%*)

* Diff rate compared with Babel

netil pushed a commit to netil/billboard.js that referenced this issue Mar 18, 2024
- Migrate transpiler: babel -> esbuild
- Update related plugins: css-minimizer-webpack-plugin, terser-webpack-plugin -> esbuild built-in

Ref naver#3601
@netil netil closed this as completed in ff0a98c Mar 18, 2024
github-actions bot pushed a commit that referenced this issue Apr 15, 2024
# [3.12.0-next.1](3.11.3...3.12.0-next.1) (2024-04-15)

### Bug Fixes

* **api:** Fix to return indexed categories ([55c17c6](55c17c6)), closes [#3365](#3365)
* **bar:** Fix stacking bar position on multiple xs ([216da62](216da62)), closes [#3372](#3372)
* **candlestick:** Fix rendering on rotated axis ([17f5058](17f5058)), closes [#3387](#3387)
* **clip:** Fix x axis hide on title.bottom ([beec1bb](beec1bb)), closes [#3364](#3364)
* **option:** Fix inconsistency of padding ([0c1ce81](0c1ce81)), closes [#3426](#3426)
* **shape:** Fix circleY() undefined error ([f4ac3f1](f4ac3f1)), closes [#3388](#3388)
* **subchart, zoom:** Fix returning domain value ([90338ec](90338ec)), closes [#3347](#3347)
* **subchart:** Fix handlebar position ([b897cbb](b897cbb)), closes [#3358](#3358)
* **title:** fix title text center align ([b254a61](b254a61)), closes [#3363](#3363)
* **tooltip:** Fix tooltip.format.value call ([f7d587d](f7d587d)), closes [#3371](#3371)
* **tooltip:** Fix tootip display on tooltip.init ([98e6f8b](98e6f8b)), closes [#3369](#3369)
* **types:** Add missing arc.needle.value ([e0a30fe](e0a30fe)), closes [#3697](#3697)
* **types:** Add missing region.label option ([e03057c](e03057c)), closes [#3732](#3732)

### Features

* **api:** Intent to ship subchart method ([976f04a](976f04a)), closes [#3342](#3342)
* **axis:** Intent to ship axis.tooltip ([54e77cb](54e77cb)), closes [#3603](#3603)
* **bundler:** Migrate babel -> esbuild ([ff0a98c](ff0a98c)), closes [#3601](#3601)
* **module:** Support dual CJS/ESM package ([437c007](437c007)), closes [#2202](#2202)
* **plugin:** Intent to ship TableView plugin ([215b611](215b611)), closes [#1873](#1873)
* **regions:** Intent to ship regions.label ([b4e3bc2](b4e3bc2)), closes [#3319](#3319)
github-actions bot pushed a commit that referenced this issue May 27, 2024
# [3.12.0](3.11.3...3.12.0) (2024-05-27)

### Bug Fixes

* **api:** Fix scatter type loading ([413812d](413812d)), closes [#3740](#3740)
* **treemap:** Fix missing element arg on data.onover/out ([22428dc](22428dc)), closes [#3766](#3766)
* **types:** Add missing arc.needle.value ([e0a30fe](e0a30fe)), closes [#3697](#3697)
* **types:** Add missing region.label option ([e03057c](e03057c)), closes [#3732](#3732)
* **types:** Correct typo in BarOptions ([a0ad93a](a0ad93a)), closes [#3749](#3749)

### Features

* **axis:** Intent to ship axis.tooltip ([54e77cb](54e77cb)), closes [#3603](#3603)
* **axis:** Intent to ship axis.x.forceAsSingle ([6ad0554](6ad0554)), closes [#3764](#3764)
* **bundler:** Migrate babel -> esbuild ([ff0a98c](ff0a98c)), closes [#3601](#3601)
* **funnel:** Intent to ship funnel type ([e4cdda1](e4cdda1)), closes [#3449](#3449)
github-actions bot pushed a commit that referenced this issue May 27, 2024
# [3.12.0](3.11.3...3.12.0) (2024-05-27)

### Bug Fixes

* **api:** Fix scatter type loading ([413812d](413812d)), closes [#3740](#3740)
* **treemap:** Fix generation w/non-exist node ([02987ab](02987ab)), closes [#3777](#3777)
* **treemap:** Fix missing element arg on data.onover/out ([22428dc](22428dc)), closes [#3766](#3766)
* **types:** Add missing arc.needle.value ([e0a30fe](e0a30fe)), closes [#3697](#3697)
* **types:** Add missing region.label option ([e03057c](e03057c)), closes [#3732](#3732)
* **types:** Correct typo in BarOptions ([a0ad93a](a0ad93a)), closes [#3749](#3749)
* **types:** Fix missing polar type ([7f5d5b0](7f5d5b0)), closes [#3778](#3778)

### Features

* **axis:** Intent to ship axis.tooltip ([54e77cb](54e77cb)), closes [#3603](#3603)
* **axis:** Intent to ship axis.x.forceAsSingle ([6ad0554](6ad0554)), closes [#3764](#3764)
* **bundler:** Migrate babel -> esbuild ([ff0a98c](ff0a98c)), closes [#3601](#3601)
* **funnel:** Intent to ship funnel type ([e4cdda1](e4cdda1)), closes [#3449](#3449)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build or distribution file related enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant