webpack/examples/component/template.md

961 B

This example demonstrates the usage of component built with webpack.

Components declare scripts and styles in a special component.json file. This file is handled by the plugin. In addition to that there is a different resolution algorithm for components.

You can see that the component-webpack-plugin handles these components including scripts, styles and other assets.

example.js

{{example.js}}

webpack.config.js

{{webpack.config.js}}

component.json

{{component.json}}

components/webpack-a-component/component.json

{{components/webpack-a-component/component.json}}

components/webpack-a-component/style.css

{{components/webpack-a-component/style.css}}

js/output.js

{{js/output.js}}

Info

Uncompressed

{{stdout}}

Minimized (uglify-js, no zip)

{{min:stdout}}