webpack/examples/mixed/template.md

706 B

This example shows how you can mix different module styles in webpack. Here CommonJs, AMD and Harmony Modules (ES6 Modules) are used. In addition to that there are different types of dynamic requires ("../require.context/templates/"+amd1+".js" and Math.random() < 0.5 ? "./commonjs" : "./amd").

You see that everything is working nicely together.

example.js

{{example.js}}

amd.js

{{amd.js}}

commonjs.js

{{commonjs.js}}

js/output.js

{{js/output.js}}

js/0.output.js

{{js/0.output.js}}

Info

Uncompressed

{{stdout}}

Minimized (uglify-js, no zip)

{{min:stdout}}