Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
npm
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Denis
October 10, 2019
Programming
0
100
npm
How to build npm
Denis
October 10, 2019
Tweet
Share
More Decks by Denis
See All by Denis
Refactoring
denredsky
0
230
2fast2furios
denredsky
0
100
Other Decks in Programming
See All in Programming
CSC307 Lecture 08
javiergs
PRO
0
670
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
Implementation Patterns
denyspoltorak
0
280
Vibe codingでおすすめの言語と開発手法
uyuki234
0
220
Apache Iceberg V3 and migration to V3
tomtanaka
0
150
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
170
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
640
Package Management Learnings from Homebrew
mikemcquaid
0
210
CSC307 Lecture 05
javiergs
PRO
0
500
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
AgentCoreとHuman in the Loop
har1101
5
220
Featured
See All Featured
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.3k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
210
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
120
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Music & Morning Musume
bryan
47
7.1k
Designing for humans not robots
tammielis
254
26k
The Pragmatic Product Professional
lauravandoore
37
7.1k
Balancing Empowerment & Direction
lara
5
880
So, you think you're a good person
axbom
PRO
2
1.9k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Unsuck your backbone
ammeep
671
58k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
Transcript
Как правильно собирать -пакеты в 2к19 году Красновский Денис ДомКлик
2 Красновский Денис Технический руководитель разработки ДомКлик speakerdeck.com/denredsky/npm telegram: @jquery_dlya_slabih
3 Why it’s important? 194.6kB Another one super cool something
for React/Angular/Vue
None
5 developers.google.com/web/tools/lighthouse
6 Performance is about retaining users improving conversions the user
experience people seo hard skills developers.google.com/web/fundamentals/performance/why- performance-matters/
7 «…отсекаю всё лишнее» ― Микеланджело Буонарроти
8 CommonJS AMD UMD ES-modules JS MODULE SYSTEM package.json
9 OR
10 Webpack Initial commit 10 Mar 2012 ~ 3,498,984 repositories
on GitHub Can do all, but ES-modules For example let’s build simple UI-lib
11 Import BAD webpack.prod.js
12 Import GOOD webpack.prod.js
13 Library target webpack.prod.js
14 Dependencies dependencies devDependencies peerDependencies
15 Externals package.json webpack.prod.js WEBPACK-NODE-EXTERNALS OR
16 Gotcha!
17 How to reduce JS via Webpack config I am
super super serious webpack.prod.js
18 ⚠ DANGER ⚠ webpack.js.org/configuration/optimization/#optimizationminimizer webpack.prod.js
19 .browserslistrc Useful for autoprefixer and @babel/preset-env
20 How to reduce CSS via Webpack mini-css-extract-plugin optimize-css-assets-webpack-plugin
21 Transpile JS via Babel 2ality.com/2015/12/babel6-loose-mode.html babel.config.js
22 npm publish package.json
23 Rollup Initial commit 17 May 2015 ~ 221,206 repositories
on GitHub Can build ES-modules For example let’s build simple utils-lib
24 That’s all rollup.config.js
25 ES6 syntax import/export preserveModules: true sideEffects: false Conditions for
tree-shaking
26 Win
27
28 Import cost Display import package size in the editor
29 bundlephobia.com
30 bundlephobia.com
31 Finally duplicate-package-checker-webpack-plugin or inspectpack check bundles weight after build
32 Dynamic import webpack.js.org/guides/code-splitting/
33 Typical situation
34 Blockchain NPM-chain
35 Step 1: we need a shared npm-package for …
36 Step 2: npm-package so cool let’s create more npm
37 Step 3: this was bad idea
speakerdeck.com/denredsky/npm Спасибо за внимание, вопросы? telegram: @jquery_dlya_slabih