UNPKG

webpack

Version:

Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jade, coffee, css, less, ... and your custom stuff.

43 lines (27 loc) 688 B
This example combines Code Splitting and Loaders. Make sure you have read the documentation of the examples that show the feature alone. The bundle loader is used to create a wrapper module for `file.js` that loads this module on demand. The wrapper module returns a function that can be called to asynchronously receive the inner module. # example.js ``` javascript {{example.js}} ``` # file.js ``` javascript {{file.js}} ``` # js/output.js ``` javascript {{js/output.js}} ``` # js/1.output.js ``` javascript {{js/1.output.js}} ``` # Info ## Uncompressed ``` {{stdout}} ``` ## Minimized (uglify-js, no zip) ``` {{min:stdout}} ```