Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1 KB

README.md

File metadata and controls

31 lines (22 loc) · 1 KB

coba-webpack

Meetup JakartaJs #29

link slide

git clone https://github.com/sofianhw/coba-webpack.git

cd coba-webpack

npm install

npm start or npm run build

python -m SimpleHTTPServer

  1. branch satu
  • Simpel webpack 2
  1. branch dua
  • Contoh tentang Modules
  1. branch tiga
  • Contoh tentang Loader
  1. branch empat
  • Contoh Plugins
  1. branch lima
  • Contoh memisahkan CSS
  1. branch enam
  • Contoh code splitting

setiap pindah branch jangan lupa npm install ulang siapa tau ada yang belum ke install

Another way to split our bundle is with System.import or require.ensure. By wrapping sections of code in these functions you create a chunk to be loaded on demand at run time. This can significantly improve load time performance by not sending everything to the client at the start. System.import takes the module name as an argument and returns a Promise. require.ensure takes a list of dependencies, a callback and an optional name for the chunk.