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

Pake bundler buat minimize bundle size #3

Open
elianiva opened this issue Sep 1, 2020 · 2 comments
Open

Pake bundler buat minimize bundle size #3

elianiva opened this issue Sep 1, 2020 · 2 comments

Comments

@elianiva
Copy link
Contributor

elianiva commented Sep 1, 2020

Ini ngga pake bundler disengaja apa gimana? Soalnya menurutku lebih enak pake bundler biar bisa pake syntax modern sama minimize size bundlenya. Kalo emang sengaja ga pake bundler sih gapapa.

Kalo pengen pake bundler, aku saranin pake tsup. Proses bundlingnya cepet banget, ga perlu nambahin config, ada opsi minify bawaan. Udah kucoba pake itu, gaada error sama sekali. Total size bundle cuma 11KB

@theyudhiztira
Copy link
Owner

Wah kalau bundling masih belajar nih blm terlalu dalam di nodejs 😬

@elianiva
Copy link
Contributor Author

elianiva commented Sep 1, 2020

tsup ini gampang kok, tinggal tambahin sebagai dev dependency abis itu tambahin script di package.json yg isinya tsup ./lib/index.js --minify

makanya aku saranin tsup soalnya gampang banget pakenya, masih aktif juga status developmentnya. ga perlu config kaya rollup/webpack/parcel dan kawan kawannya.

hasilnya bakal ada di folder dist, jadi tiap mau publish packagenya jalanin npm run build dulu. Kalo mau sih aku bisa buka pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants