webpack/examples
Tobias Koppers b241549d31 Merge tag 'v4.28.3' into next
4.28.3
2018-12-29 12:59:56 +01:00
..
aggressive-merging Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
chunkhash Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
code-splitted-css-bundle Switch from uglifyjs-webpack-plugin to terser-webpack-plugin 2018-11-18 22:56:10 +03:00
code-splitted-require.context Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
code-splitted-require.context-amd Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
code-splitting Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
code-splitting-bundle-loader Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
code-splitting-harmony Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
code-splitting-native-import-context Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
code-splitting-native-import-context-filter Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
code-splitting-specify-chunk-name Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
coffee-script Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
common-chunk-and-vendor-chunk Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
common-chunk-grandchildren Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
commonjs Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
dll Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
dll-app-and-vendor Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
dll-entry-only Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
dll-user Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
explicit-vendor-chunk Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
externals Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
extra-async-chunk Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
extra-async-chunk-advanced Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
harmony Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
harmony-interop Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
harmony-library Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
harmony-unused Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
http2-aggressive-splitting Merge tag 'v4.28.3' into next 2018-12-29 12:59:56 +01:00
hybrid-routing Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
i18n Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
loader Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
many-pages Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
mixed Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
multi-compiler Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
multi-part-library Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
multiple-entry-points Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
named-chunks Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
node_modules added dll example with module 2015-10-13 16:19:11 +02:00
persistent-caching Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
require.context Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
require.resolve Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
scope-hoisting Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
side-effects Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
source-map Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
two-explicit-vendor-chunks Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
wasm-simple Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
README.md improve build script 2018-10-29 11:29:06 +01:00
build-common.js improve example build and test 2018-10-17 21:25:40 +02:00
buildAll.js Refactor chunk graph 2018-01-19 19:21:30 +01:00
examples.js Refactor example scripts and test to allow nested folders 2017-07-27 13:24:56 +02:00
template-common.js Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00

README.md

Examples

Aggressive Merging

aggressive-merging

Chunk

chunkhash

common-chunk-and-vendor-chunk

explicit-vendor-chunk

extra-async-chunk-advanced

extra-async-chunk

code-splitting-specify-chunk-name

named-chunks example demonstrating merging of chunks with named chunks

two-explicit-vendor-chunks

Code Splitted

code-splitted-css-bundle

code-splitted-require.context-amd example demonstrating contexts in a code-split environment with AMD.

code-splitted-require.context example demonstrating contexts in a code-split environment.

Code Splitting

code-splitting example demonstrating a very simple case of Code Splitting.

code-splitting-bundle-loader example demonstrating Code Splitting through the builder loader

code-splitting-harmony

code-splitting-native-import-context

code-splitting-specify-chunk-name

Coffee Script

coffee-script example demonstrating code written in coffee-script.

CommonJS

commonjs example demonstrating a very simple program

DLL

dll

dll-user

Externals

externals

Harmony

harmony

code-splitting-harmony

harmony-interop

harmony-library

harmony-unused

HTTP2 Aggressive Splitting

http2-aggressive-splitting

Hybrid Routing

hybrid-routing

i18n

i18n example demonstrating localization.

Loader

loader example demonstrating the usage of loaders.

Mixed

mixed example demonstrating mixing CommonJs and AMD

Multi Compiler

multi-compiler

Multi Part Library

multi-part-library

Multiple Entry Points

multiple-entry-points example demonstrating multiple entry points with Code Splitting.

Require Context

require.context example demonstrating automatic creation of contexts when using variables in require.

Require Resolve

require.resolve example demonstrating how to cache clearing of modules with require.resolve and require.cache.

Scope Hoisting

scope-hoisting

Side Effects

side-effects

Source Map

source-map

Web Worker

web-worker example demonstrating creating WebWorkers with webpack and the worker-loader.

Requests

If you think an example is missing, please report it as issue. :)

Building an Example

  1. Run yarn in the root of the project.
  2. Run yarn setup in the root of the project.
  3. Run yarn add --dev webpack-cli in the root of the project.
  4. Run node build.js in the specific example directory. (Ex: cd examples/commonjs && node build.js)

Note: To build all examples run npm run build:examples