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
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
220
2fast2furios
denredsky
0
100
Other Decks in Programming
See All in Programming
ペアプロ × 生成AI 現場での実践と課題について / generative-ai-in-pair-programming
codmoninc
0
190
データの民主化を支える、透明性のあるデータ利活用への挑戦 2025-06-25 Database Engineering Meetup#7
y_ken
0
340
今ならAmazon ECSのサービス間通信をどう選ぶか / Selection of ECS Interservice Communication 2025
tkikuc
20
3.8k
Node-RED を(HTTP で)つなげる MCP サーバーを作ってみた
highu
0
110
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
690
AIコーディング道場勉強会#2 君(エンジニア)たちはどう生きるか
misakiotb
1
270
20250628_非エンジニアがバイブコーディングしてみた
ponponmikankan
0
540
A2A プロトコルを試してみる
azukiazusa1
2
1.3k
Team operations that are not burdened by SRE
kazatohiei
1
290
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
1
130
エンジニア向け採用ピッチ資料
inusan
0
180
Azure AI Foundryではじめてのマルチエージェントワークフロー
seosoft
0
150
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
4 Signs Your Business is Dying
shpigford
184
22k
Code Review Best Practice
trishagee
69
18k
Being A Developer After 40
akosma
90
590k
Speed Design
sergeychernyshev
32
1k
Code Reviewing Like a Champion
maltzj
524
40k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
Designing for Performance
lara
609
69k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Designing for humans not robots
tammielis
253
25k
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