diff --git a/.gitignore b/.gitignore index b0a5c34..260d8b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /node_modules/ /dist/ +npm-debug.log diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 441ab5e..0000000 --- a/.jshintrc +++ /dev/null @@ -1,95 +0,0 @@ -{ - // From JSHint Default Configuration File - // See http://jshint.com/docs/ for more details - - "maxerr" : 50, // {int} Maximum error before stopping - - // Enforcing - "bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.) - "camelcase" : false, // true: Identifiers must be in camelCase - "curly" : true, // true: Require {} for every new block or scope - "eqeqeq" : true, // true: Require triple equals (===) for comparison - "forin" : false, // true: Require filtering for..in loops with obj.hasOwnProperty() - "freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc. - "immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());` - "indent" : 2, // {int} Number of spaces to use for indentation - "latedef" : false, // true: Require variables/functions to be defined before being used - "newcap" : false, // true: Require capitalization of all constructor functions e.g. `new F()` - "noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee` - "noempty" : true, // true: Prohibit use of empty blocks - "nonbsp" : true, // true: Prohibit "non-breaking whitespace" characters. - "nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment) - "plusplus" : false, // true: Prohibit use of `++` & `--` - "quotmark" : false, // Quotation mark consistency: - // false : do nothing (default) - // true : ensure whatever is used is consistent - // "single" : require single quotes - // "double" : require double quotes - "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks) - "unused" : true, // true: Require all defined variables be used - "strict" : true, // true: Requires all functions run in ES5 Strict Mode - "maxparams" : false, // {int} Max number of formal params allowed per function - "maxdepth" : false, // {int} Max depth of nested blocks (within functions) - "maxstatements" : false, // {int} Max number statements per function - "maxcomplexity" : false, // {int} Max cyclomatic complexity per function - "maxlen" : false, // {int} Max number of characters per line - - // Relaxing - "asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons) - "boss" : false, // true: Tolerate assignments where comparisons would be expected - "debug" : false, // true: Allow debugger statements e.g. browser breakpoints. - "eqnull" : false, // true: Tolerate use of `== null` - "es5" : false, // true: Allow ES5 syntax (ex: getters and setters) - "esnext" : false, // true: Allow ES.next (ES6) syntax (ex: `const`) - "moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features) - // (ex: `for each`, multiple try/catch, function expression…) - "evil" : false, // true: Tolerate use of `eval` and `new Function()` - "expr" : false, // true: Tolerate `ExpressionStatement` as Programs - "funcscope" : false, // true: Tolerate defining variables inside control statements - "globalstrict" : false, // true: Allow global "use strict" (also enables 'strict') - "iterator" : false, // true: Tolerate using the `__iterator__` property - "lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block - "laxbreak" : false, // true: Tolerate possibly unsafe line breakings - "laxcomma" : false, // true: Tolerate comma-first style coding - "loopfunc" : true, // true: Tolerate functions being defined in loops - "multistr" : false, // true: Tolerate multi-line strings - "noyield" : false, // true: Tolerate generator functions with no yield statement in them. - "notypeof" : false, // true: Tolerate invalid typeof operator values - "proto" : false, // true: Tolerate using the `__proto__` property - "scripturl" : false, // true: Tolerate script-targeted URLs - "shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;` - "sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation - "supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;` - "validthis" : false, // true: Tolerate using this in a non-constructor function - - // Environments - "browser" : true, // Web Browser (window, document, etc) - "browserify" : false, // Browserify (node.js code in the browser) - "couch" : false, // CouchDB - "devel" : true, // Development/debugging (alert, confirm, etc) - "dojo" : false, // Dojo Toolkit - "jasmine" : false, // Jasmine - "jquery" : false, // jQuery - "mocha" : true, // Mocha - "mootools" : false, // MooTools - "node" : true, // Node.js - "nonstandard" : false, // Widely adopted globals (escape, unescape, etc) - "prototypejs" : false, // Prototype and Scriptaculous - "qunit" : false, // QUnit - "rhino" : false, // Rhino - "shelljs" : false, // ShellJS - "worker" : false, // Web Workers - "wsh" : false, // Windows Scripting Host - "yui" : false, // Yahoo User Interface - - // Custom Globals - "globals" : { - // jasmine helpers - "expect": false, - "describe": false, - "ddescribe": false, - "beforeEach": false, - "it": false, - "iit": false - } -} diff --git a/README.md b/README.md index 1bc593f..9cb6380 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,19 @@ HTML Webpack Plugin -=================== -[![npm version](https://badge.fury.io/js/html-webpack-plugin.svg)](http://badge.fury.io/js/html-webpack-plugin) [![Dependency Status](https://david-dm.org/ampedandwired/html-webpack-plugin.svg)](https://david-dm.org/ampedandwired/html-webpack-plugin) [![bitHound Score](https://www.bithound.io/github/ampedandwired/html-webpack-plugin/badges/score.svg)](https://www.bithound.io/github/ampedandwired/html-webpack-plugin) [![Build status](https://travis-ci.org/ampedandwired/html-webpack-plugin.svg)](https://travis-ci.org/ampedandwired/html-webpack-plugin) +=================== +[![npm version](https://badge.fury.io/js/html-webpack-plugin.svg)](http://badge.fury.io/js/html-webpack-plugin) [![Dependency Status](https://david-dm.org/ampedandwired/html-webpack-plugin.svg)](https://david-dm.org/ampedandwired/html-webpack-plugin) [![Build status](https://travis-ci.org/ampedandwired/html-webpack-plugin.svg)](https://travis-ci.org/ampedandwired/html-webpack-plugin) [![Windows build status](https://ci.appveyor.com/api/projects/status/github/ampedandwired/html-webpack-plugin?svg=true&branch=master)](https://ci.appveyor.com/project/jantimon/html-webpack-plugin) [![js-semistandard-style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg?style=flat-square)](https://github.com/Flet/semistandard) + +[![NPM](https://nodei.co/npm/html-webpack-plugin.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/html-webpack-plugin/) This is a [webpack](http://webpack.github.io/) plugin that simplifies creation of HTML files to serve your webpack bundles. This is especially useful for webpack bundles that include -a hash in the filename which changes every compilation. You can either let the plugin generate an HTML file for you or supply -your own template (using [blueimp templates](https://github.com/blueimp/JavaScript-Templates)). - - -Version 2.x ------------ - -HTML Webpack Plugin 2.x is in beta right now however we are planing to release it soon. - -Installation: -```shell -$ npm install html-webpack-plugin@2 --save-dev -``` - -Please take a look at the [HTML Webpack Plugin 2.x readme](https://github.com/ampedandwired/html-webpack-plugin/tree/feature/loaders) +a hash in the filename which changes every compilation. You can either let the plugin generate an HTML file for you, supply +your own template using lodash templates or use your own loader. Installation ------------ -Install the old version of the plugin with npm: +Install the plugin with npm: ```shell -$ npm install html-webpack-plugin --save-dev +$ npm install html-webpack-plugin@2 --save-dev ``` Basic Usage @@ -75,16 +64,17 @@ Allowed values are as follows: - `title`: The title to use for the generated HTML document. - `filename`: The file to write the HTML to. Defaults to `index.html`. You can specify a subdirectory here too (eg: `assets/admin.html`). -- `template`: A html template (supports [blueimp templates](https://github.com/blueimp/JavaScript-Templates)). -- `templateContent`: A html string or a function returning the html (supports [blueimp templates](https://github.com/blueimp/JavaScript-Templates)). +- `template`: Path to the template. Supports loaders e.g. `html!./index.html`. - `inject`: `true | 'head' | 'body' | false` Inject all assets into the given `template` or `templateContent` - When passing `true` or `'body'` all javascript resources will be placed at the bottom of the body element. `'head'` will place the scripts in the head element. - `favicon`: Adds the given favicon path to the output html. - `minify`: `{...} | false` Pass a [html-minifier](https://github.com/kangax/html-minifier#options-quick-reference) options object to minify the output. - `hash`: `true | false` if `true` then append a unique webpack compilation hash to all included scripts and css files. This is useful for cache busting. +- `cache`: `true | false` if `true` (default) try to emit the file only if it was changed. +- `showErrors`: `true | false` if `true` (default) errors details will be written into the html page. - `chunks`: Allows you to add only some chunks (e.g. only the unit-test chunk) -- `excludeChunks`: Allows you to skip some chunks (e.g. don't add the unit-test chunk) - `chunksSortMode`: Allows to controll how chunks should be sorted before they are included to the html. Allowed values: 'none' | 'default' | {function} - default: 'auto' +- `excludeChunks`: Allows you to skip some chunks (e.g. don't add the unit-test chunk) Here's an example webpack config illustrating how to use these options: ```javascript @@ -135,7 +125,7 @@ and favicon files into the markup. ```javascript plugins: [ new HtmlWebpackPlugin({ - title: 'Custom template', + title: 'Custom template', template: 'my-index.html', // Load a custom template inject: 'body' // Inject all scripts into the body }) @@ -149,13 +139,30 @@ plugins: [ - {%= o.htmlWebpackPlugin.options.title %} + <%= htmlWebpackPlugin.options.title %> ``` +If you already have a template loader, you can use it to parse the template. + +```javascript +module: { + loaders: [ + { test: /\.hbs$/, loader: "handlebars" } + ] +}, +plugins: [ + new HtmlWebpackPlugin({ + title: 'Custom template using Handlebars', + template: 'my-index.hbs', + inject: 'body' + }) +] +``` + Alternatively, if you already have your template's content in a String, you can pass it to the plugin using the `templateContent` option: ```javascript @@ -167,8 +174,8 @@ plugins: [ ] ``` -You can use the [blueimp template](https://github.com/blueimp/JavaScript-Templates) syntax out of the box. -If the `inject` feature doesn't fit your needs and you want full control over the asset placement use the [default template](https://github.com/ampedandwired/html-webpack-plugin/blob/master/default_index.html) +You can use the lodash syntax out of the box. +If the `inject` feature doesn't fit your needs and you want full control over the asset placement use the [default template](https://github.com/ampedandwired/html-webpack-plugin/blob/master/default_index.ejs) as a starting point for writing your own. The `templateContent` option can also be a function to use another template language like jade: @@ -260,3 +267,20 @@ plugins: [ ] ``` +Events +------ + +To allow other plugins to alter the html this plugin executes the following events: + + * `html-webpack-plugin-before-html-processing` + * `html-webpack-plugin-after-html-processing` + * `html-webpack-plugin-after-emit` + +Usage: + +```javascript +compilation.plugin('html-webpack-plugin-before-html-processing', function(htmlPluginData, callback) { + htmlPluginData.html += 'The magic footer'; + callback(); +}); +``` diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..5bc2d72 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,23 @@ +# appveyor file +# http://www.appveyor.com/docs/appveyor-yml + +environment: + matrix: + - nodejs_version: 0.10 + - nodejs_version: 0.12 + - nodejs_version: 4 + +version: "{build}" +build: off +deploy: off +matrix: + fast_finish: true + +install: + - ps: Install-Product node $env:nodejs_version + - npm install + +test_script: + - node --version + - npm --version + - npm test \ No newline at end of file diff --git a/default_inject_index.html b/default_index.ejs similarity index 51% rename from default_inject_index.html rename to default_index.ejs index 6967979..f9466a4 100644 --- a/default_inject_index.html +++ b/default_index.ejs @@ -2,8 +2,8 @@ - {%=o.htmlWebpackPlugin.options.title || 'Webpack App'%} + <%= htmlWebpackPlugin.options.title %> - + \ No newline at end of file diff --git a/default_index.html b/default_index.html deleted file mode 100644 index 69d3384..0000000 --- a/default_index.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {%=o.htmlWebpackPlugin.options.title || 'Webpack App'%} - {% if (o.htmlWebpackPlugin.files.favicon) { %} - - {% } %} - {% for (var css in o.htmlWebpackPlugin.files.css) { %} - - {% } %} - - - {% for (var chunk in o.htmlWebpackPlugin.files.chunks) { %} - - {% } %} - - diff --git a/examples/appcache/dist/0714810ae3fb211173e2964249507195.png b/examples/appcache/dist/0714810ae3fb211173e2964249507195.png new file mode 100644 index 0000000..d71b3d7 Binary files /dev/null and b/examples/appcache/dist/0714810ae3fb211173e2964249507195.png differ diff --git a/examples/appcache/dist/bundle.js b/examples/appcache/dist/bundle.js new file mode 100644 index 0000000..6e76564 --- /dev/null +++ b/examples/appcache/dist/bundle.js @@ -0,0 +1,60 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(1); + var h1 = document.createElement('h1'); + h1.innerHTML = 'Hello world!'; + document.body.appendChild(h1); + + +/***/ }, +/* 1 */ +/***/ function(module, exports) { + + // removed by extract-text-webpack-plugin + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/examples/appcache/dist/index.html b/examples/appcache/dist/index.html new file mode 100644 index 0000000..3a2aa9e --- /dev/null +++ b/examples/appcache/dist/index.html @@ -0,0 +1 @@ +Example template \ No newline at end of file diff --git a/examples/appcache/dist/manifest.appcache b/examples/appcache/dist/manifest.appcache new file mode 100644 index 0000000..150df1a --- /dev/null +++ b/examples/appcache/dist/manifest.appcache @@ -0,0 +1,9 @@ +CACHE MANIFEST +# 9e067d48ea3de65b9733 + +0714810ae3fb211173e2964249507195.png +bundle.js +styles.css + +NETWORK: +* diff --git a/examples/appcache/dist/styles.css b/examples/appcache/dist/styles.css new file mode 100644 index 0000000..232a2cd --- /dev/null +++ b/examples/appcache/dist/styles.css @@ -0,0 +1,3 @@ +body { + background: snow; +} \ No newline at end of file diff --git a/examples/appcache/example.js b/examples/appcache/example.js new file mode 100755 index 0000000..d62766b --- /dev/null +++ b/examples/appcache/example.js @@ -0,0 +1,4 @@ +require('./main.css'); +var h1 = document.createElement('h1'); +h1.innerHTML = 'Hello world!'; +document.body.appendChild(h1); diff --git a/examples/appcache/logo.png b/examples/appcache/logo.png new file mode 100644 index 0000000..d71b3d7 Binary files /dev/null and b/examples/appcache/logo.png differ diff --git a/examples/appcache/main.css b/examples/appcache/main.css new file mode 100644 index 0000000..232a2cd --- /dev/null +++ b/examples/appcache/main.css @@ -0,0 +1,3 @@ +body { + background: snow; +} \ No newline at end of file diff --git a/examples/appcache/template.html b/examples/appcache/template.html new file mode 100644 index 0000000..b7b4f97 --- /dev/null +++ b/examples/appcache/template.html @@ -0,0 +1,11 @@ + + + + + Example template + + + + + + \ No newline at end of file diff --git a/examples/appcache/webpack.config.js b/examples/appcache/webpack.config.js new file mode 100755 index 0000000..503cc88 --- /dev/null +++ b/examples/appcache/webpack.config.js @@ -0,0 +1,31 @@ +var AppCachePlugin = require('appcache-webpack-plugin'); +var HtmlWebpackPlugin = require('../..'); +var ExtractTextPlugin = require('extract-text-webpack-plugin'); +module.exports = { + entry: './example.js', + output: { + path: __dirname + '/dist', + publicPath: '', + filename: 'bundle.js' + }, + module: { + loaders: [ + { test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') }, + { test: /\.png$/, loader: 'file-loader' }, + { test: /\.html$/, loader: 'html-loader?-removeOptionalTags' } + ] + }, + plugins: [ + new AppCachePlugin(), + new HtmlWebpackPlugin({ + filename: 'index.html', + template: 'template.html', + minify: { + removeComments: true, + collapseWhitespace: true + } + }), + new ExtractTextPlugin('styles.css') + ] +}; + diff --git a/examples/custom-template/dist/0714810ae3fb211173e2964249507195.png b/examples/custom-template/dist/0714810ae3fb211173e2964249507195.png new file mode 100644 index 0000000..d71b3d7 Binary files /dev/null and b/examples/custom-template/dist/0714810ae3fb211173e2964249507195.png differ diff --git a/examples/custom-template/dist/bundle.js b/examples/custom-template/dist/bundle.js new file mode 100644 index 0000000..6e76564 --- /dev/null +++ b/examples/custom-template/dist/bundle.js @@ -0,0 +1,60 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(1); + var h1 = document.createElement('h1'); + h1.innerHTML = 'Hello world!'; + document.body.appendChild(h1); + + +/***/ }, +/* 1 */ +/***/ function(module, exports) { + + // removed by extract-text-webpack-plugin + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/examples/custom-template/dist/index.html b/examples/custom-template/dist/index.html new file mode 100644 index 0000000..a9d8bf4 --- /dev/null +++ b/examples/custom-template/dist/index.html @@ -0,0 +1,12 @@ + + + + + Webpack App + + + +

Partial

+ + + \ No newline at end of file diff --git a/examples/custom-template/dist/styles.css b/examples/custom-template/dist/styles.css new file mode 100644 index 0000000..232a2cd --- /dev/null +++ b/examples/custom-template/dist/styles.css @@ -0,0 +1,3 @@ +body { + background: snow; +} \ No newline at end of file diff --git a/examples/custom-template/example.js b/examples/custom-template/example.js new file mode 100755 index 0000000..d62766b --- /dev/null +++ b/examples/custom-template/example.js @@ -0,0 +1,4 @@ +require('./main.css'); +var h1 = document.createElement('h1'); +h1.innerHTML = 'Hello world!'; +document.body.appendChild(h1); diff --git a/examples/custom-template/logo.png b/examples/custom-template/logo.png new file mode 100644 index 0000000..d71b3d7 Binary files /dev/null and b/examples/custom-template/logo.png differ diff --git a/examples/custom-template/main.css b/examples/custom-template/main.css new file mode 100644 index 0000000..232a2cd --- /dev/null +++ b/examples/custom-template/main.css @@ -0,0 +1,3 @@ +body { + background: snow; +} \ No newline at end of file diff --git a/examples/custom-template/partial.html b/examples/custom-template/partial.html new file mode 100644 index 0000000..47dc0f7 --- /dev/null +++ b/examples/custom-template/partial.html @@ -0,0 +1,2 @@ +

Partial

+ \ No newline at end of file diff --git a/examples/custom-template/readme.md b/examples/custom-template/readme.md new file mode 100644 index 0000000..5c00e6f --- /dev/null +++ b/examples/custom-template/readme.md @@ -0,0 +1,4 @@ +# custom template + +This example uses a custom underscore template which inlines an partial using the html-loader: +`<%= require('html!./partial.html') %>` \ No newline at end of file diff --git a/examples/custom-template/template.html b/examples/custom-template/template.html new file mode 100644 index 0000000..0e33b24 --- /dev/null +++ b/examples/custom-template/template.html @@ -0,0 +1,11 @@ + + + + + <%= htmlWebpackPlugin.options.title %> + + + + <%= require('html!./partial.html') %> + + \ No newline at end of file diff --git a/examples/custom-template/webpack.config.js b/examples/custom-template/webpack.config.js new file mode 100755 index 0000000..967ddb2 --- /dev/null +++ b/examples/custom-template/webpack.config.js @@ -0,0 +1,22 @@ +var HtmlWebpackPlugin = require('../..'); +var ExtractTextPlugin = require('extract-text-webpack-plugin'); +module.exports = { + entry: './example.js', + output: { + path: __dirname + '/dist', + publicPath: '', + filename: 'bundle.js' + }, + module: { + loaders: [ + { test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') }, + { test: /\.png$/, loader: 'file-loader' } + ] + }, + plugins: [ + new HtmlWebpackPlugin({ + template: 'template.html' + }), + new ExtractTextPlugin('styles.css') + ] +}; diff --git a/examples/default/dist/bundle.js b/examples/default/dist/bundle.js new file mode 100644 index 0000000..21ab8de --- /dev/null +++ b/examples/default/dist/bundle.js @@ -0,0 +1,404 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(1); + var h1 = document.createElement('h1'); + h1.innerHTML = 'Hello world!'; + document.body.appendChild(h1); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + // style-loader: Adds some css to the DOM by adding a