際際滷

際際滷Share a Scribd company logo
WEBPACK
MODULE BUNDLER
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
ABOUT SPEAKER
Thapwaris Chinsirirathkul
Infopreneur
Graphic Designer
Frontend Developer
CEO and Founder CLOUDCOURSE.IO
thapwaris@cloudcourse.io
facebook.com/xbyrztf
What¨s Webpack?
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
Webpack ??????????????????????????????? JavaScript Modules
???????????????????????????????????????????????
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
JavaScript Modules?
???? CommonJS, AMD ?????????? ES6(ES2015) Module
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
???????
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
???? !!
Webpack ??? async I/O ????????????? cache ????????
?????????????????? compile ????????????????????
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
??????? !!
Webpack ?????????????????????????????????????????????????????????
????????????????????????????????????????????????
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
??????????????????????
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
LOADER
???????? ES6, JSX, TypeScript ???? JavaScript Modules ?????
??????????? ?????????????????????????????????????? JavaScript
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
LOADER
??????? Webpack ?????????????????????????????????
??????????????????? Loader
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
LOADER
???? Loader ??????????? transform ??? Browserify ???????
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
LOADER
???????????????????????????? Modules ????????????????????????????????
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
DEV SERVER
Webpack ?????????? web server ??????? dev ???
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
DEV SERVER
????????????????? Web Server ??????????????????? ???????????????
???????????????????????????????????????????????? BrowserSync
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
DEV SERVER
???????????????????????????????????????????? ?????????? inject css ??????
??????????????????????????????????????????????????????
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
DEV SERVER
?????????????????????? ReactJS ????????????????????????????????????
????? component ????????????????????????????????????????? state ????
???????????????????????????
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CODE SPLITTER
?????????????? Modules ?????????????????????????
???????????????? Compile ??????????????????????
????????????????????????????????????????
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CODE SPLITTER
?????????????????????????????????????? ????????????????????????
??????????????? ???????????????????????????????????????????????
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CODE SPLITTER
???? ?????????????? Core ?????????????????????????????????????????
??????????? ???????????????????????????????????????????????????????
???????????????? ???????????????????????????? RequireJS
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
WEBPACK
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
WEBPACK INSTALLATION
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
npm install webpack -g
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
HELLO, WEBPACK
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
webpack <entry> <output>
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
WEBPACK LOADER
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
?????????????????? loader ???????????????? css
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
???????????????????????????? loader
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
?????????? webpack ./entry.js bundle.js
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
WEBPACK CONFIGURATION
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
???????????????????????????? ^webpack ̄ ???????
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
??????????????????? compile ???????
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
??????????????????????????????????? compile ???? webpack Cprogress --colors
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
???????????????????? command window ??????????????????? compile
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
????? --watch ???? webpack ????????????????????????????????????????????????
????????????????????????????? compile ????????
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
WEBPACK DEV SERVER
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
?????????? npm install webpack-dev-server Cg ????????????????????? Dev Server
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
????????????????????????? webpack dev server ?????
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
?????????? webpack-dev-server Cprogress Ccolors ??????????????? server ??????
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
WEBPACK HOT DEV SERVER
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
?????????? npm init ???????????????????? package.json
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
???????????????????? yes ????????????????????? enter
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
?????????? webpack --save-dev ???????????? webpack ?? project
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
?????????? webpack-dev-server --save-dev ???????????? dev server ?? project
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
???????????????????? dev server ?????????
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
?????????? webpack-dev-server Ccontent-base --hot ????????????????????? hot load
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
?????????? npm run dev ????????????????????? hot load
CLOUDCOURSE.IO | THAPWARIS CHINSIRIRATHKUL
??????????????????????????? value ??? css ??????? webpack ????????????????????? inject css ?????

More Related Content

Webpack Module Bundler | cloudcourse.io