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
230
2fast2furios
denredsky
0
100
Other Decks in Programming
See All in Programming
ぼくの開発環境2026
yuzneri
0
170
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
Basic Architectures
denyspoltorak
0
660
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6k
Architectural Extensions
denyspoltorak
0
280
Apache Iceberg V3 and migration to V3
tomtanaka
0
150
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
200
Data-Centric Kaggle
isax1015
2
770
CSC307 Lecture 09
javiergs
PRO
1
830
Implementation Patterns
denyspoltorak
0
280
Featured
See All Featured
Game over? The fight for quality and originality in the time of robots
wayneb77
1
110
Done Done
chrislema
186
16k
Chasing Engaging Ingredients in Design
codingconduct
0
110
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
110
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
84
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
350
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
90
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
52k
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