Skip to content

mizchi-sandbox/webpack-chunk-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Split Example

Routing で読み込みチャンクを切り替える例

  • foo.js: shared を使う
  • bar.js: shared を使う
  • index.js: 条件的に foo bar を読み込みを切り替える

注意点

  • /* webpackChunkName: "shared" */ のマジックコメントは webpack のために必須
  • ファイルの出力を同じディレクトリにして、相対パスを合わせないといけない(あるいは output.publicPath をいじる)

LICENSE

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published