1998-12-31T23:00:00.000Z

├── .bithoundrc ├── .editorconfig ├── .github └── issue_template.md ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── appveyor.yml ├── default_index.ejs ├── docs └── template-option.md ├── examples ├── appcache │ ├── dist │ │ ├── webpack-1 │ │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ │ ├── bundle.js │ │ │ ├── index.html │ │ │ ├── manifest.appcache │ │ │ └── styles.css │ │ ├── webpack-2 │ │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ │ ├── bundle.js │ │ │ ├── index.html │ │ │ ├── manifest.appcache │ │ │ └── styles.css │ │ └── webpack-3 │ │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ │ ├── bundle.js │ │ │ ├── index.html │ │ │ ├── manifest.appcache │ │ │ └── styles.css │ ├── example.js │ ├── logo.png │ ├── main.css │ ├── template.html │ └── webpack.config.js ├── build-examples.js ├── custom-template │ ├── dist │ │ ├── webpack-1 │ │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ │ ├── bundle.js │ │ │ ├── index.html │ │ │ └── styles.css │ │ ├── webpack-2 │ │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ │ ├── bundle.js │ │ │ ├── index.html │ │ │ └── styles.css │ │ └── webpack-3 │ │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ │ ├── bundle.js │ │ │ ├── index.html │ │ │ └── styles.css │ ├── example.js │ ├── logo.png │ ├── main.css │ ├── partial.html │ ├── readme.md │ ├── template.html │ └── webpack.config.js ├── default │ ├── dist │ │ ├── webpack-1 │ │ │ ├── bundle.js │ │ │ └── index.html │ │ ├── webpack-2 │ │ │ ├── bundle.js │ │ │ └── index.html │ │ └── webpack-3 │ │ │ ├── bundle.js │ │ │ └── index.html │ ├── example.js │ ├── main.css │ ├── readme.md │ └── webpack.config.js ├── favicon │ ├── dist │ │ ├── webpack-1 │ │ │ ├── bundle.js │ │ │ ├── favicon.html │ │ │ ├── favicon.ico │ │ │ └── styles.css │ │ ├── webpack-2 │ │ │ ├── bundle.js │ │ │ ├── favicon.html │ │ │ ├── favicon.ico │ │ │ └── styles.css │ │ └── webpack-3 │ │ │ ├── bundle.js │ │ │ ├── favicon.html │ │ │ ├── favicon.ico │ │ │ └── styles.css │ ├── example.js │ ├── favicon.ico │ ├── main.css │ ├── template.html │ └── webpack.config.js ├── html-loader │ ├── dist │ │ ├── webpack-1 │ │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ │ ├── about.html │ │ │ ├── bundle.js │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ └── styles.css │ │ ├── webpack-2 │ │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ │ ├── about.html │ │ │ ├── bundle.js │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ └── styles.css │ │ └── webpack-3 │ │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ │ ├── about.html │ │ │ ├── bundle.js │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ └── styles.css │ ├── example.js │ ├── favicon.ico │ ├── logo.png │ ├── main.css │ ├── template.html │ └── webpack.config.js ├── inline │ ├── dist │ │ ├── webpack-1 │ │ │ ├── bundle.js │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ └── styles.css │ │ ├── webpack-2 │ │ │ ├── bundle.js │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ └── styles.css │ │ └── webpack-3 │ │ │ ├── bundle.js │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ └── styles.css │ ├── example.js │ ├── favicon.ico │ ├── main.css │ ├── readme.md │ ├── template.jade │ └── webpack.config.js ├── jade-loader │ ├── dist │ │ ├── webpack-1 │ │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ │ ├── bundle.js │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ └── styles.css │ │ ├── webpack-2 │ │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ │ ├── bundle.js │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ └── styles.css │ │ └── webpack-3 │ │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ │ ├── bundle.js │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ └── styles.css │ ├── example.js │ ├── favicon.ico │ ├── logo.png │ ├── main.css │ ├── readme.md │ ├── template.jade │ ├── time.jade │ └── webpack.config.js ├── javascript-advanced │ ├── dist │ │ ├── webpack-1 │ │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ │ ├── bundle.js │ │ │ ├── index.html │ │ │ └── styles.css │ │ ├── webpack-2 │ │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ │ ├── bundle.js │ │ │ ├── index.html │ │ │ └── styles.css │ │ └── webpack-3 │ │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ │ ├── bundle.js │ │ │ ├── index.html │ │ │ └── styles.css │ ├── example.js │ ├── logo.png │ ├── main.css │ ├── partial.html │ ├── readme.md │ ├── template.js │ ├── universial.js │ └── webpack.config.js ├── javascript │ ├── dist │ │ ├── webpack-1 │ │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ │ ├── bundle.js │ │ │ ├── index.html │ │ │ └── styles.css │ │ ├── webpack-2 │ │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ │ ├── bundle.js │ │ │ ├── index.html │ │ │ └── styles.css │ │ └── webpack-3 │ │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ │ ├── bundle.js │ │ │ ├── index.html │ │ │ └── styles.css │ ├── example.js │ ├── logo.png │ ├── main.css │ ├── partial.html │ ├── readme.md │ ├── template.js │ ├── universial.js │ └── webpack.config.js └── sort-manually │ ├── a.js │ ├── b.js │ ├── c.js │ ├── d.js │ ├── dist │ ├── webpack-1 │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ ├── a.js │ │ ├── b.js │ │ ├── c.js │ │ ├── d.js │ │ ├── e.js │ │ ├── first-file.html │ │ ├── second-file.html │ │ └── styles.css │ ├── webpack-2 │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ ├── a.js │ │ ├── b.js │ │ ├── c.js │ │ ├── d.js │ │ ├── e.js │ │ ├── first-file.html │ │ ├── second-file.html │ │ └── styles.css │ └── webpack-3 │ │ ├── 0714810ae3fb211173e2964249507195.png │ │ ├── a.js │ │ ├── b.js │ │ ├── c.js │ │ ├── d.js │ │ ├── e.js │ │ ├── first-file.html │ │ ├── second-file.html │ │ └── styles.css │ ├── e.js │ ├── logo.png │ ├── main.css │ ├── template.html │ └── webpack.config.js ├── index.js ├── lib ├── chunksorter.js ├── compiler.js ├── errors.js └── loader.js ├── migration.md ├── package.json ├── spec ├── BasicSpec.js ├── CachingSpec.js ├── ExampleSpec.js ├── fixtures │ ├── async.js │ ├── common.js │ ├── empty_html.html │ ├── favicon.ico │ ├── index.js │ ├── invalid.html │ ├── legacy.html │ ├── main.css │ ├── plain.html │ ├── spaced_plain.html │ ├── template.jade │ ├── templateParam.js │ ├── test.html │ ├── theme.js │ ├── util.js │ └── webpackconfig.html └── support │ └── jasmine.json └── yarn.lock /.bithoundrc: -------------------------------------------------------------------------------- 1 | { 2 | "ignore": [ 3 | "**/examples/**", 4 | "**/node_modules/**", 5 | ], 6 | "test": [ 7 | "**/spec/**" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | insert_final_newline = true 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | trim_trailing_whitespace = true 9 | 10 | [*.md] 11 | trim_trailing_whitespace = false 12 | -------------------------------------------------------------------------------- /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Prerequisites 4 | 5 | - We realize there is a lot of data requested here. We ask only that you do your best to provide as much information as possible so we can better help you. 6 | - Support questions are better asked in one of the following locations: 7 | - [Stack Overflow](http://stackoverflow.com/questions/tagged/html-webpack-plugin) 8 | - Ensure the issue isn't already reported. 9 | - Should be reproducible with the latest version of `html-webpack-plugin`. 10 | - (Ensure `npm ls html-webpack-plugin` matches ) 11 | 12 | *Delete the above section and the instructions in the sections below before submitting* 13 | 14 | 15 | ## Description 16 | 17 | If this is a feature request, explain why it should be added. Specific use-cases are best. 18 | 19 | For bug reports, please provide as much *relevant* info as possible. 20 | 21 | ### Error Message & Stack Trace 22 | 23 | ``` 24 | COPY THE ERROR MESSAGE, INCLUDING STACK TRACE HERE 25 | ``` 26 | 27 | ### Config 28 | 29 | Copy the relevant section from `webpack.config.js`: 30 | 31 | ```js 32 | module.exports = { 33 | entry: 'app.js', 34 | output: { 35 | path: 'dist', 36 | filename: 'index_bundle.js' 37 | }, 38 | module: { 39 | rules: [ 40 | ... 41 | ] 42 | } 43 | plugins: [ 44 | new HtmlWebpackPlugin(), 45 | ... 46 | ] 47 | } 48 | ``` 49 | 50 | Copy your template file: 51 | 52 | ```html 53 | 54 | 55 |
56 |
--------------------------------------------------------------------------------
/examples/appcache/dist/webpack-1/manifest.appcache:
--------------------------------------------------------------------------------
1 | CACHE MANIFEST
2 | # f688cbdde5a6e721015e
3 |
4 | 0714810ae3fb211173e2964249507195.png
5 | bundle.js
6 | styles.css
7 |
8 | NETWORK:
9 | *
10 |
--------------------------------------------------------------------------------
/examples/appcache/dist/webpack-1/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/appcache/dist/webpack-2/0714810ae3fb211173e2964249507195.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/appcache/dist/webpack-2/0714810ae3fb211173e2964249507195.png
--------------------------------------------------------------------------------
/examples/appcache/dist/webpack-2/bundle.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // identity function for calling harmony imports with the correct context
37 | /******/ __webpack_require__.i = function(value) { return value; };
38 | /******/
39 | /******/ // define getter function for harmony exports
40 | /******/ __webpack_require__.d = function(exports, name, getter) {
41 | /******/ if(!__webpack_require__.o(exports, name)) {
42 | /******/ Object.defineProperty(exports, name, {
43 | /******/ configurable: false,
44 | /******/ enumerable: true,
45 | /******/ get: getter
46 | /******/ });
47 | /******/ }
48 | /******/ };
49 | /******/
50 | /******/ // getDefaultExport function for compatibility with non-harmony modules
51 | /******/ __webpack_require__.n = function(module) {
52 | /******/ var getter = module && module.__esModule ?
53 | /******/ function getDefault() { return module['default']; } :
54 | /******/ function getModuleExports() { return module; };
55 | /******/ __webpack_require__.d(getter, 'a', getter);
56 | /******/ return getter;
57 | /******/ };
58 | /******/
59 | /******/ // Object.prototype.hasOwnProperty.call
60 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
61 | /******/
62 | /******/ // __webpack_public_path__
63 | /******/ __webpack_require__.p = "";
64 | /******/
65 | /******/ // Load entry module and return exports
66 | /******/ return __webpack_require__(__webpack_require__.s = 1);
67 | /******/ })
68 | /************************************************************************/
69 | /******/ ([
70 | /* 0 */
71 | /***/ (function(module, exports) {
72 |
73 | // removed by extract-text-webpack-plugin
74 |
75 | /***/ }),
76 | /* 1 */
77 | /***/ (function(module, exports, __webpack_require__) {
78 |
79 | __webpack_require__(0);
80 | var h1 = document.createElement('h1');
81 | h1.innerHTML = 'Hello world!';
82 | document.body.appendChild(h1);
83 |
84 |
85 | /***/ })
86 | /******/ ]);
--------------------------------------------------------------------------------
/examples/appcache/dist/webpack-2/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/appcache/dist/webpack-2/manifest.appcache:
--------------------------------------------------------------------------------
1 | CACHE MANIFEST
2 | # 737de2033617f9f6144d
3 |
4 | 0714810ae3fb211173e2964249507195.png
5 | bundle.js
6 | styles.css
7 |
8 | NETWORK:
9 | *
10 |
--------------------------------------------------------------------------------
/examples/appcache/dist/webpack-2/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/appcache/dist/webpack-3/0714810ae3fb211173e2964249507195.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/appcache/dist/webpack-3/0714810ae3fb211173e2964249507195.png
--------------------------------------------------------------------------------
/examples/appcache/dist/webpack-3/bundle.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // define getter function for harmony exports
37 | /******/ __webpack_require__.d = function(exports, name, getter) {
38 | /******/ if(!__webpack_require__.o(exports, name)) {
39 | /******/ Object.defineProperty(exports, name, {
40 | /******/ configurable: false,
41 | /******/ enumerable: true,
42 | /******/ get: getter
43 | /******/ });
44 | /******/ }
45 | /******/ };
46 | /******/
47 | /******/ // getDefaultExport function for compatibility with non-harmony modules
48 | /******/ __webpack_require__.n = function(module) {
49 | /******/ var getter = module && module.__esModule ?
50 | /******/ function getDefault() { return module['default']; } :
51 | /******/ function getModuleExports() { return module; };
52 | /******/ __webpack_require__.d(getter, 'a', getter);
53 | /******/ return getter;
54 | /******/ };
55 | /******/
56 | /******/ // Object.prototype.hasOwnProperty.call
57 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58 | /******/
59 | /******/ // __webpack_public_path__
60 | /******/ __webpack_require__.p = "";
61 | /******/
62 | /******/ // Load entry module and return exports
63 | /******/ return __webpack_require__(__webpack_require__.s = 0);
64 | /******/ })
65 | /************************************************************************/
66 | /******/ ([
67 | /* 0 */
68 | /***/ (function(module, exports, __webpack_require__) {
69 |
70 | __webpack_require__(1);
71 | var h1 = document.createElement('h1');
72 | h1.innerHTML = 'Hello world!';
73 | document.body.appendChild(h1);
74 |
75 |
76 | /***/ }),
77 | /* 1 */
78 | /***/ (function(module, exports) {
79 |
80 | // removed by extract-text-webpack-plugin
81 |
82 | /***/ })
83 | /******/ ]);
--------------------------------------------------------------------------------
/examples/appcache/dist/webpack-3/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/appcache/dist/webpack-3/manifest.appcache:
--------------------------------------------------------------------------------
1 | CACHE MANIFEST
2 | # eda37a6c6de5fd0ecfbe
3 |
4 | 0714810ae3fb211173e2964249507195.png
5 | bundle.js
6 | styles.css
7 |
8 | NETWORK:
9 | *
10 |
--------------------------------------------------------------------------------
/examples/appcache/dist/webpack-3/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/appcache/example.js:
--------------------------------------------------------------------------------
1 | require('./main.css');
2 | var h1 = document.createElement('h1');
3 | h1.innerHTML = 'Hello world!';
4 | document.body.appendChild(h1);
5 |
--------------------------------------------------------------------------------
/examples/appcache/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/appcache/logo.png
--------------------------------------------------------------------------------
/examples/appcache/main.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/appcache/template.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/appcache/webpack.config.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var AppCachePlugin = require('appcache-webpack-plugin');
3 | var HtmlWebpackPlugin = require('../..');
4 | var ExtractTextPlugin = require('extract-text-webpack-plugin');
5 | var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
6 |
7 | module.exports = {
8 | context: __dirname,
9 | entry: './example.js',
10 | output: {
11 | path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
12 | publicPath: '',
13 | filename: 'bundle.js'
14 | },
15 | module: {
16 | loaders: [
17 | { test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') },
18 | { test: /\.png$/, loader: 'file-loader' },
19 | { test: /\.html$/, loader: 'html-loader?-removeOptionalTags' }
20 | ]
21 | },
22 | plugins: [
23 | new AppCachePlugin(),
24 | new HtmlWebpackPlugin({
25 | filename: 'index.html',
26 | template: 'template.html',
27 | minify: {
28 | removeComments: true,
29 | collapseWhitespace: true
30 | }
31 | }),
32 | new ExtractTextPlugin('styles.css')
33 | ]
34 | };
35 |
--------------------------------------------------------------------------------
/examples/build-examples.js:
--------------------------------------------------------------------------------
1 | /**
2 | * This file is just a helper to compile all examples.
3 | *
4 | * You could do the same by going into each example and execute
5 | * `webpack`
6 | */
7 | var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
8 |
9 | var fs = require('fs');
10 | var path = require('path');
11 | var rimraf = require('rimraf');
12 | var webpack = require('webpack');
13 | var ExtractTextPlugin = require('extract-text-webpack-plugin');
14 |
15 | if (Number(webpackMajorVersion) > 1) {
16 | var extractOriginal = ExtractTextPlugin.extract;
17 | ExtractTextPlugin.extract = function (fallback, use) {
18 | return extractOriginal({
19 | fallback: fallback,
20 | use: use
21 | });
22 | };
23 | }
24 |
25 | var examples = fs.readdirSync(__dirname).filter(function (file) {
26 | return fs.statSync(path.join(__dirname, file)).isDirectory();
27 | });
28 |
29 | examples.forEach(function (exampleName) {
30 | var examplePath = path.join(__dirname, exampleName);
31 | var configFile = path.join(examplePath, 'webpack.config.js');
32 |
33 | rimraf.sync(path.join(examplePath, 'dist', 'webpack-' + webpackMajorVersion));
34 | webpack(require(configFile), function (err, stats) {
35 | if (err) {
36 | console.error(err.stack || err);
37 | if (err.details) {
38 | console.error(err.details);
39 | }
40 | return;
41 | }
42 |
43 | const info = stats.toJson();
44 |
45 | if (stats.hasErrors()) {
46 | console.error(info.errors);
47 | }
48 |
49 | if (stats.hasWarnings()) {
50 | console.warn(info.warnings);
51 | }
52 | });
53 | });
54 |
--------------------------------------------------------------------------------
/examples/custom-template/dist/webpack-1/0714810ae3fb211173e2964249507195.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/custom-template/dist/webpack-1/0714810ae3fb211173e2964249507195.png
--------------------------------------------------------------------------------
/examples/custom-template/dist/webpack-1/bundle.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 |
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 |
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId])
10 | /******/ return installedModules[moduleId].exports;
11 |
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ exports: {},
15 | /******/ id: moduleId,
16 | /******/ loaded: false
17 | /******/ };
18 |
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 |
22 | /******/ // Flag the module as loaded
23 | /******/ module.loaded = true;
24 |
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 |
29 |
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 |
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 |
36 | /******/ // __webpack_public_path__
37 | /******/ __webpack_require__.p = "";
38 |
39 | /******/ // Load entry module and return exports
40 | /******/ return __webpack_require__(0);
41 | /******/ })
42 | /************************************************************************/
43 | /******/ ([
44 | /* 0 */
45 | /***/ (function(module, exports, __webpack_require__) {
46 |
47 | __webpack_require__(1);
48 | var h1 = document.createElement('h1');
49 | h1.innerHTML = 'Hello world!';
50 | document.body.appendChild(h1);
51 |
52 |
53 | /***/ }),
54 | /* 1 */
55 | /***/ (function(module, exports) {
56 |
57 | // removed by extract-text-webpack-plugin
58 |
59 | /***/ })
60 | /******/ ]);
--------------------------------------------------------------------------------
/examples/custom-template/dist/webpack-1/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/custom-template/dist/webpack-1/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/custom-template/dist/webpack-2/0714810ae3fb211173e2964249507195.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/custom-template/dist/webpack-2/0714810ae3fb211173e2964249507195.png
--------------------------------------------------------------------------------
/examples/custom-template/dist/webpack-2/bundle.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // identity function for calling harmony imports with the correct context
37 | /******/ __webpack_require__.i = function(value) { return value; };
38 | /******/
39 | /******/ // define getter function for harmony exports
40 | /******/ __webpack_require__.d = function(exports, name, getter) {
41 | /******/ if(!__webpack_require__.o(exports, name)) {
42 | /******/ Object.defineProperty(exports, name, {
43 | /******/ configurable: false,
44 | /******/ enumerable: true,
45 | /******/ get: getter
46 | /******/ });
47 | /******/ }
48 | /******/ };
49 | /******/
50 | /******/ // getDefaultExport function for compatibility with non-harmony modules
51 | /******/ __webpack_require__.n = function(module) {
52 | /******/ var getter = module && module.__esModule ?
53 | /******/ function getDefault() { return module['default']; } :
54 | /******/ function getModuleExports() { return module; };
55 | /******/ __webpack_require__.d(getter, 'a', getter);
56 | /******/ return getter;
57 | /******/ };
58 | /******/
59 | /******/ // Object.prototype.hasOwnProperty.call
60 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
61 | /******/
62 | /******/ // __webpack_public_path__
63 | /******/ __webpack_require__.p = "";
64 | /******/
65 | /******/ // Load entry module and return exports
66 | /******/ return __webpack_require__(__webpack_require__.s = 1);
67 | /******/ })
68 | /************************************************************************/
69 | /******/ ([
70 | /* 0 */
71 | /***/ (function(module, exports) {
72 |
73 | // removed by extract-text-webpack-plugin
74 |
75 | /***/ }),
76 | /* 1 */
77 | /***/ (function(module, exports, __webpack_require__) {
78 |
79 | __webpack_require__(0);
80 | var h1 = document.createElement('h1');
81 | h1.innerHTML = 'Hello world!';
82 | document.body.appendChild(h1);
83 |
84 |
85 | /***/ })
86 | /******/ ]);
--------------------------------------------------------------------------------
/examples/custom-template/dist/webpack-2/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/custom-template/dist/webpack-2/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/custom-template/dist/webpack-3/0714810ae3fb211173e2964249507195.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/custom-template/dist/webpack-3/0714810ae3fb211173e2964249507195.png
--------------------------------------------------------------------------------
/examples/custom-template/dist/webpack-3/bundle.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // define getter function for harmony exports
37 | /******/ __webpack_require__.d = function(exports, name, getter) {
38 | /******/ if(!__webpack_require__.o(exports, name)) {
39 | /******/ Object.defineProperty(exports, name, {
40 | /******/ configurable: false,
41 | /******/ enumerable: true,
42 | /******/ get: getter
43 | /******/ });
44 | /******/ }
45 | /******/ };
46 | /******/
47 | /******/ // getDefaultExport function for compatibility with non-harmony modules
48 | /******/ __webpack_require__.n = function(module) {
49 | /******/ var getter = module && module.__esModule ?
50 | /******/ function getDefault() { return module['default']; } :
51 | /******/ function getModuleExports() { return module; };
52 | /******/ __webpack_require__.d(getter, 'a', getter);
53 | /******/ return getter;
54 | /******/ };
55 | /******/
56 | /******/ // Object.prototype.hasOwnProperty.call
57 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58 | /******/
59 | /******/ // __webpack_public_path__
60 | /******/ __webpack_require__.p = "";
61 | /******/
62 | /******/ // Load entry module and return exports
63 | /******/ return __webpack_require__(__webpack_require__.s = 0);
64 | /******/ })
65 | /************************************************************************/
66 | /******/ ([
67 | /* 0 */
68 | /***/ (function(module, exports, __webpack_require__) {
69 |
70 | __webpack_require__(1);
71 | var h1 = document.createElement('h1');
72 | h1.innerHTML = 'Hello world!';
73 | document.body.appendChild(h1);
74 |
75 |
76 | /***/ }),
77 | /* 1 */
78 | /***/ (function(module, exports) {
79 |
80 | // removed by extract-text-webpack-plugin
81 |
82 | /***/ })
83 | /******/ ]);
--------------------------------------------------------------------------------
/examples/custom-template/dist/webpack-3/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/custom-template/dist/webpack-3/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/custom-template/example.js:
--------------------------------------------------------------------------------
1 | require('./main.css');
2 | var h1 = document.createElement('h1');
3 | h1.innerHTML = 'Hello world!';
4 | document.body.appendChild(h1);
5 |
--------------------------------------------------------------------------------
/examples/custom-template/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/custom-template/logo.png
--------------------------------------------------------------------------------
/examples/custom-template/main.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/custom-template/partial.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/custom-template/readme.md:
--------------------------------------------------------------------------------
1 | # custom template
2 |
3 | This example uses a custom underscore template which inlines an partial using the html-loader:
4 | `<%= require('html!./partial.html') %>`
--------------------------------------------------------------------------------
/examples/custom-template/template.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/favicon/webpack.config.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var HtmlWebpackPlugin = require('../..');
3 | var ExtractTextPlugin = require('extract-text-webpack-plugin');
4 | var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
5 | module.exports = {
6 | context: __dirname,
7 | entry: './example.js',
8 | output: {
9 | path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
10 | publicPath: '',
11 | filename: 'bundle.js'
12 | },
13 | module: {
14 | loaders: [
15 | { test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') },
16 | { test: /\.png$/, loader: 'file-loader' }
17 | ]
18 | },
19 | plugins: [
20 | new HtmlWebpackPlugin({
21 | title: 'HtmlWebpackPlugin example',
22 | favicon: 'favicon.ico',
23 | filename: 'favicon.html'
24 | }),
25 | new ExtractTextPlugin('styles.css')
26 | ]
27 | };
28 |
--------------------------------------------------------------------------------
/examples/html-loader/dist/webpack-1/0714810ae3fb211173e2964249507195.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/html-loader/dist/webpack-1/0714810ae3fb211173e2964249507195.png
--------------------------------------------------------------------------------
/examples/html-loader/dist/webpack-1/about.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/html-loader/dist/webpack-1/bundle.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 |
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 |
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId])
10 | /******/ return installedModules[moduleId].exports;
11 |
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ exports: {},
15 | /******/ id: moduleId,
16 | /******/ loaded: false
17 | /******/ };
18 |
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 |
22 | /******/ // Flag the module as loaded
23 | /******/ module.loaded = true;
24 |
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 |
29 |
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 |
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 |
36 | /******/ // __webpack_public_path__
37 | /******/ __webpack_require__.p = "";
38 |
39 | /******/ // Load entry module and return exports
40 | /******/ return __webpack_require__(0);
41 | /******/ })
42 | /************************************************************************/
43 | /******/ ([
44 | /* 0 */
45 | /***/ (function(module, exports, __webpack_require__) {
46 |
47 | __webpack_require__(1);
48 | var h1 = document.createElement('h1');
49 | h1.innerHTML = 'Hello world!';
50 | document.body.appendChild(h1);
51 |
52 |
53 | /***/ }),
54 | /* 1 */
55 | /***/ (function(module, exports) {
56 |
57 | // removed by extract-text-webpack-plugin
58 |
59 | /***/ })
60 | /******/ ]);
--------------------------------------------------------------------------------
/examples/html-loader/dist/webpack-1/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/html-loader/dist/webpack-1/favicon.ico
--------------------------------------------------------------------------------
/examples/html-loader/dist/webpack-1/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/html-loader/dist/webpack-1/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/html-loader/dist/webpack-2/0714810ae3fb211173e2964249507195.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/html-loader/dist/webpack-2/0714810ae3fb211173e2964249507195.png
--------------------------------------------------------------------------------
/examples/html-loader/dist/webpack-2/about.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/html-loader/dist/webpack-2/bundle.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // identity function for calling harmony imports with the correct context
37 | /******/ __webpack_require__.i = function(value) { return value; };
38 | /******/
39 | /******/ // define getter function for harmony exports
40 | /******/ __webpack_require__.d = function(exports, name, getter) {
41 | /******/ if(!__webpack_require__.o(exports, name)) {
42 | /******/ Object.defineProperty(exports, name, {
43 | /******/ configurable: false,
44 | /******/ enumerable: true,
45 | /******/ get: getter
46 | /******/ });
47 | /******/ }
48 | /******/ };
49 | /******/
50 | /******/ // getDefaultExport function for compatibility with non-harmony modules
51 | /******/ __webpack_require__.n = function(module) {
52 | /******/ var getter = module && module.__esModule ?
53 | /******/ function getDefault() { return module['default']; } :
54 | /******/ function getModuleExports() { return module; };
55 | /******/ __webpack_require__.d(getter, 'a', getter);
56 | /******/ return getter;
57 | /******/ };
58 | /******/
59 | /******/ // Object.prototype.hasOwnProperty.call
60 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
61 | /******/
62 | /******/ // __webpack_public_path__
63 | /******/ __webpack_require__.p = "";
64 | /******/
65 | /******/ // Load entry module and return exports
66 | /******/ return __webpack_require__(__webpack_require__.s = 1);
67 | /******/ })
68 | /************************************************************************/
69 | /******/ ([
70 | /* 0 */
71 | /***/ (function(module, exports) {
72 |
73 | // removed by extract-text-webpack-plugin
74 |
75 | /***/ }),
76 | /* 1 */
77 | /***/ (function(module, exports, __webpack_require__) {
78 |
79 | __webpack_require__(0);
80 | var h1 = document.createElement('h1');
81 | h1.innerHTML = 'Hello world!';
82 | document.body.appendChild(h1);
83 |
84 |
85 | /***/ })
86 | /******/ ]);
--------------------------------------------------------------------------------
/examples/html-loader/dist/webpack-2/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/html-loader/dist/webpack-2/favicon.ico
--------------------------------------------------------------------------------
/examples/html-loader/dist/webpack-2/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/html-loader/dist/webpack-2/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/html-loader/dist/webpack-3/0714810ae3fb211173e2964249507195.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/html-loader/dist/webpack-3/0714810ae3fb211173e2964249507195.png
--------------------------------------------------------------------------------
/examples/html-loader/dist/webpack-3/about.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/html-loader/dist/webpack-3/bundle.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // define getter function for harmony exports
37 | /******/ __webpack_require__.d = function(exports, name, getter) {
38 | /******/ if(!__webpack_require__.o(exports, name)) {
39 | /******/ Object.defineProperty(exports, name, {
40 | /******/ configurable: false,
41 | /******/ enumerable: true,
42 | /******/ get: getter
43 | /******/ });
44 | /******/ }
45 | /******/ };
46 | /******/
47 | /******/ // getDefaultExport function for compatibility with non-harmony modules
48 | /******/ __webpack_require__.n = function(module) {
49 | /******/ var getter = module && module.__esModule ?
50 | /******/ function getDefault() { return module['default']; } :
51 | /******/ function getModuleExports() { return module; };
52 | /******/ __webpack_require__.d(getter, 'a', getter);
53 | /******/ return getter;
54 | /******/ };
55 | /******/
56 | /******/ // Object.prototype.hasOwnProperty.call
57 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58 | /******/
59 | /******/ // __webpack_public_path__
60 | /******/ __webpack_require__.p = "";
61 | /******/
62 | /******/ // Load entry module and return exports
63 | /******/ return __webpack_require__(__webpack_require__.s = 0);
64 | /******/ })
65 | /************************************************************************/
66 | /******/ ([
67 | /* 0 */
68 | /***/ (function(module, exports, __webpack_require__) {
69 |
70 | __webpack_require__(1);
71 | var h1 = document.createElement('h1');
72 | h1.innerHTML = 'Hello world!';
73 | document.body.appendChild(h1);
74 |
75 |
76 | /***/ }),
77 | /* 1 */
78 | /***/ (function(module, exports) {
79 |
80 | // removed by extract-text-webpack-plugin
81 |
82 | /***/ })
83 | /******/ ]);
--------------------------------------------------------------------------------
/examples/html-loader/dist/webpack-3/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/html-loader/dist/webpack-3/favicon.ico
--------------------------------------------------------------------------------
/examples/html-loader/dist/webpack-3/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/html-loader/dist/webpack-3/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/html-loader/example.js:
--------------------------------------------------------------------------------
1 | require('./main.css');
2 | var h1 = document.createElement('h1');
3 | h1.innerHTML = 'Hello world!';
4 | document.body.appendChild(h1);
5 |
--------------------------------------------------------------------------------
/examples/html-loader/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/html-loader/favicon.ico
--------------------------------------------------------------------------------
/examples/html-loader/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/html-loader/logo.png
--------------------------------------------------------------------------------
/examples/html-loader/main.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/html-loader/template.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/html-loader/webpack.config.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var HtmlWebpackPlugin = require('../..');
3 | var ExtractTextPlugin = require('extract-text-webpack-plugin');
4 | var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
5 | module.exports = {
6 | context: __dirname,
7 | entry: './example.js',
8 | output: {
9 | path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
10 | publicPath: '',
11 | filename: 'bundle.js'
12 | },
13 | module: {
14 | loaders: [
15 | { test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') },
16 | { test: /\.png$/, loader: 'file-loader' },
17 | { test: /\.html$/, loader: 'html-loader' }
18 | ]
19 | },
20 | plugins: [
21 | new HtmlWebpackPlugin({
22 | filename: 'index.html',
23 | favicon: 'favicon.ico',
24 | template: 'template.html'
25 | }),
26 | new HtmlWebpackPlugin({
27 | filename: 'about.html',
28 | favicon: 'favicon.ico',
29 | template: 'template.html'
30 | }),
31 | new ExtractTextPlugin('styles.css')
32 | ]
33 | };
34 |
--------------------------------------------------------------------------------
/examples/inline/dist/webpack-1/bundle.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 |
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 |
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId])
10 | /******/ return installedModules[moduleId].exports;
11 |
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ exports: {},
15 | /******/ id: moduleId,
16 | /******/ loaded: false
17 | /******/ };
18 |
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 |
22 | /******/ // Flag the module as loaded
23 | /******/ module.loaded = true;
24 |
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 |
29 |
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 |
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 |
36 | /******/ // __webpack_public_path__
37 | /******/ __webpack_require__.p = "";
38 |
39 | /******/ // Load entry module and return exports
40 | /******/ return __webpack_require__(0);
41 | /******/ })
42 | /************************************************************************/
43 | /******/ ([
44 | /* 0 */
45 | /***/ (function(module, exports, __webpack_require__) {
46 |
47 | 'use strict';
48 | __webpack_require__(1);
49 |
50 | console.log('Hello World');
51 |
52 |
53 | /***/ }),
54 | /* 1 */
55 | /***/ (function(module, exports) {
56 |
57 | // removed by extract-text-webpack-plugin
58 |
59 | /***/ })
60 | /******/ ]);
--------------------------------------------------------------------------------
/examples/inline/dist/webpack-1/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/inline/dist/webpack-1/favicon.ico
--------------------------------------------------------------------------------
/examples/inline/dist/webpack-1/index.html:
--------------------------------------------------------------------------------
1 | 1998-12-31T23:00:00.000Z

1998-12-31T23:00:00.000Z

1999-01-01T00:00:00.000Z

--------------------------------------------------------------------------------
/examples/javascript-advanced/dist/webpack-1/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/javascript-advanced/dist/webpack-2/0714810ae3fb211173e2964249507195.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/javascript-advanced/dist/webpack-2/0714810ae3fb211173e2964249507195.png
--------------------------------------------------------------------------------
/examples/javascript-advanced/dist/webpack-2/bundle.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // identity function for calling harmony imports with the correct context
37 | /******/ __webpack_require__.i = function(value) { return value; };
38 | /******/
39 | /******/ // define getter function for harmony exports
40 | /******/ __webpack_require__.d = function(exports, name, getter) {
41 | /******/ if(!__webpack_require__.o(exports, name)) {
42 | /******/ Object.defineProperty(exports, name, {
43 | /******/ configurable: false,
44 | /******/ enumerable: true,
45 | /******/ get: getter
46 | /******/ });
47 | /******/ }
48 | /******/ };
49 | /******/
50 | /******/ // getDefaultExport function for compatibility with non-harmony modules
51 | /******/ __webpack_require__.n = function(module) {
52 | /******/ var getter = module && module.__esModule ?
53 | /******/ function getDefault() { return module['default']; } :
54 | /******/ function getModuleExports() { return module; };
55 | /******/ __webpack_require__.d(getter, 'a', getter);
56 | /******/ return getter;
57 | /******/ };
58 | /******/
59 | /******/ // Object.prototype.hasOwnProperty.call
60 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
61 | /******/
62 | /******/ // __webpack_public_path__
63 | /******/ __webpack_require__.p = "";
64 | /******/
65 | /******/ // Load entry module and return exports
66 | /******/ return __webpack_require__(__webpack_require__.s = 2);
67 | /******/ })
68 | /************************************************************************/
69 | /******/ ([
70 | /* 0 */
71 | /***/ (function(module, exports, __webpack_require__) {
72 |
73 | "use strict";
74 | eval("// This file is used for frontend and backend\n\n\n// If compiled by the html-webpack-plugin\n// HTML_WEBPACK_PLUGIN is set to true:\nvar backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined';\n\nmodule.exports = function () {\n return 'Hello World from ' + (backend ? 'backend' : 'frontend');\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./universial.js\n// module id = 0\n// module chunks = 0\n\n//# sourceURL=webpack:///./universial.js?");
75 |
76 | /***/ }),
77 | /* 1 */
78 | /***/ (function(module, exports) {
79 |
80 | eval("// removed by extract-text-webpack-plugin\n\n//////////////////\n// WEBPACK FOOTER\n// ./main.css\n// module id = 1\n// module chunks = 0\n\n//# sourceURL=webpack:///./main.css?");
81 |
82 | /***/ }),
83 | /* 2 */
84 | /***/ (function(module, exports, __webpack_require__) {
85 |
86 | eval("__webpack_require__(1);\n\nvar universal = __webpack_require__(0);\nvar h1 = document.createElement('h1');\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./example.js\n// module id = 2\n// module chunks = 0\n\n//# sourceURL=webpack:///./example.js?");
87 |
88 | /***/ })
89 | /******/ ]);
--------------------------------------------------------------------------------
/examples/javascript-advanced/dist/webpack-2/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/javascript-advanced/dist/webpack-2/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/javascript-advanced/dist/webpack-3/0714810ae3fb211173e2964249507195.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/javascript-advanced/dist/webpack-3/0714810ae3fb211173e2964249507195.png
--------------------------------------------------------------------------------
/examples/javascript-advanced/dist/webpack-3/bundle.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // define getter function for harmony exports
37 | /******/ __webpack_require__.d = function(exports, name, getter) {
38 | /******/ if(!__webpack_require__.o(exports, name)) {
39 | /******/ Object.defineProperty(exports, name, {
40 | /******/ configurable: false,
41 | /******/ enumerable: true,
42 | /******/ get: getter
43 | /******/ });
44 | /******/ }
45 | /******/ };
46 | /******/
47 | /******/ // getDefaultExport function for compatibility with non-harmony modules
48 | /******/ __webpack_require__.n = function(module) {
49 | /******/ var getter = module && module.__esModule ?
50 | /******/ function getDefault() { return module['default']; } :
51 | /******/ function getModuleExports() { return module; };
52 | /******/ __webpack_require__.d(getter, 'a', getter);
53 | /******/ return getter;
54 | /******/ };
55 | /******/
56 | /******/ // Object.prototype.hasOwnProperty.call
57 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58 | /******/
59 | /******/ // __webpack_public_path__
60 | /******/ __webpack_require__.p = "";
61 | /******/
62 | /******/ // Load entry module and return exports
63 | /******/ return __webpack_require__(__webpack_require__.s = 0);
64 | /******/ })
65 | /************************************************************************/
66 | /******/ ([
67 | /* 0 */
68 | /***/ (function(module, exports, __webpack_require__) {
69 |
70 | eval("__webpack_require__(1);\n\nvar universal = __webpack_require__(2);\nvar h1 = document.createElement('h1');\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./example.js\n// module id = 0\n// module chunks = 0\n\n//# sourceURL=webpack:///./example.js?");
71 |
72 | /***/ }),
73 | /* 1 */
74 | /***/ (function(module, exports) {
75 |
76 | eval("// removed by extract-text-webpack-plugin\n\n//////////////////\n// WEBPACK FOOTER\n// ./main.css\n// module id = 1\n// module chunks = 0\n\n//# sourceURL=webpack:///./main.css?");
77 |
78 | /***/ }),
79 | /* 2 */
80 | /***/ (function(module, exports, __webpack_require__) {
81 |
82 | "use strict";
83 | eval("// This file is used for frontend and backend\n\n\n// If compiled by the html-webpack-plugin\n// HTML_WEBPACK_PLUGIN is set to true:\nvar backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined';\n\nmodule.exports = function () {\n return 'Hello World from ' + (backend ? 'backend' : 'frontend');\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./universial.js\n// module id = 2\n// module chunks = 0\n\n//# sourceURL=webpack:///./universial.js?");
84 |
85 | /***/ })
86 | /******/ ]);
--------------------------------------------------------------------------------
/examples/javascript-advanced/dist/webpack-3/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/javascript-advanced/dist/webpack-3/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/javascript-advanced/example.js:
--------------------------------------------------------------------------------
1 | require('./main.css');
2 |
3 | var universal = require('./universial.js');
4 | var h1 = document.createElement('h1');
5 | h1.innerHTML = universal();
6 |
7 | document.body.appendChild(h1);
8 |
--------------------------------------------------------------------------------
/examples/javascript-advanced/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/javascript-advanced/logo.png
--------------------------------------------------------------------------------
/examples/javascript-advanced/main.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/javascript-advanced/partial.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/javascript-advanced/readme.md:
--------------------------------------------------------------------------------
1 | # isomorphic javascript-advanced example
2 |
3 | This example is similar to the javascript example however it allows takes
4 | parameters from the config and works asynchronously
--------------------------------------------------------------------------------
/examples/javascript-advanced/template.js:
--------------------------------------------------------------------------------
1 | // Webpack require:
2 | var partial = require('./partial.html');
3 | var universal = require('./universial.js');
4 |
5 | // Export a function / promise / or a string:
6 | // This function has to return a string or promised string:
7 | module.exports = function (templateParams) {
8 | var html = '' +
9 | '
--------------------------------------------------------------------------------
/examples/javascript/dist/webpack-1/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/javascript/dist/webpack-2/0714810ae3fb211173e2964249507195.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/javascript/dist/webpack-2/0714810ae3fb211173e2964249507195.png
--------------------------------------------------------------------------------
/examples/javascript/dist/webpack-2/bundle.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // identity function for calling harmony imports with the correct context
37 | /******/ __webpack_require__.i = function(value) { return value; };
38 | /******/
39 | /******/ // define getter function for harmony exports
40 | /******/ __webpack_require__.d = function(exports, name, getter) {
41 | /******/ if(!__webpack_require__.o(exports, name)) {
42 | /******/ Object.defineProperty(exports, name, {
43 | /******/ configurable: false,
44 | /******/ enumerable: true,
45 | /******/ get: getter
46 | /******/ });
47 | /******/ }
48 | /******/ };
49 | /******/
50 | /******/ // getDefaultExport function for compatibility with non-harmony modules
51 | /******/ __webpack_require__.n = function(module) {
52 | /******/ var getter = module && module.__esModule ?
53 | /******/ function getDefault() { return module['default']; } :
54 | /******/ function getModuleExports() { return module; };
55 | /******/ __webpack_require__.d(getter, 'a', getter);
56 | /******/ return getter;
57 | /******/ };
58 | /******/
59 | /******/ // Object.prototype.hasOwnProperty.call
60 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
61 | /******/
62 | /******/ // __webpack_public_path__
63 | /******/ __webpack_require__.p = "";
64 | /******/
65 | /******/ // Load entry module and return exports
66 | /******/ return __webpack_require__(__webpack_require__.s = 2);
67 | /******/ })
68 | /************************************************************************/
69 | /******/ ([
70 | /* 0 */
71 | /***/ (function(module, exports, __webpack_require__) {
72 |
73 | "use strict";
74 | eval("// This file is used for frontend and backend\n\n\n// If compiled by the html-webpack-plugin\n// HTML_WEBPACK_PLUGIN is set to true:\nvar backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined';\n\nmodule.exports = function () {\n return 'Hello World from ' + (backend ? 'backend' : 'frontend');\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./universial.js\n// module id = 0\n// module chunks = 0\n\n//# sourceURL=webpack:///./universial.js?");
75 |
76 | /***/ }),
77 | /* 1 */
78 | /***/ (function(module, exports) {
79 |
80 | eval("// removed by extract-text-webpack-plugin\n\n//////////////////\n// WEBPACK FOOTER\n// ./main.css\n// module id = 1\n// module chunks = 0\n\n//# sourceURL=webpack:///./main.css?");
81 |
82 | /***/ }),
83 | /* 2 */
84 | /***/ (function(module, exports, __webpack_require__) {
85 |
86 | eval("__webpack_require__(1);\n\nvar universal = __webpack_require__(0);\nvar h1 = document.createElement('h1');\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./example.js\n// module id = 2\n// module chunks = 0\n\n//# sourceURL=webpack:///./example.js?");
87 |
88 | /***/ })
89 | /******/ ]);
--------------------------------------------------------------------------------
/examples/javascript/dist/webpack-2/index.html:
--------------------------------------------------------------------------------
1 | Hello World from backend2017-04-17T17:12:14.752Z
--------------------------------------------------------------------------------
/examples/javascript/dist/webpack-2/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/javascript/dist/webpack-3/0714810ae3fb211173e2964249507195.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/javascript/dist/webpack-3/0714810ae3fb211173e2964249507195.png
--------------------------------------------------------------------------------
/examples/javascript/dist/webpack-3/bundle.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // define getter function for harmony exports
37 | /******/ __webpack_require__.d = function(exports, name, getter) {
38 | /******/ if(!__webpack_require__.o(exports, name)) {
39 | /******/ Object.defineProperty(exports, name, {
40 | /******/ configurable: false,
41 | /******/ enumerable: true,
42 | /******/ get: getter
43 | /******/ });
44 | /******/ }
45 | /******/ };
46 | /******/
47 | /******/ // getDefaultExport function for compatibility with non-harmony modules
48 | /******/ __webpack_require__.n = function(module) {
49 | /******/ var getter = module && module.__esModule ?
50 | /******/ function getDefault() { return module['default']; } :
51 | /******/ function getModuleExports() { return module; };
52 | /******/ __webpack_require__.d(getter, 'a', getter);
53 | /******/ return getter;
54 | /******/ };
55 | /******/
56 | /******/ // Object.prototype.hasOwnProperty.call
57 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58 | /******/
59 | /******/ // __webpack_public_path__
60 | /******/ __webpack_require__.p = "";
61 | /******/
62 | /******/ // Load entry module and return exports
63 | /******/ return __webpack_require__(__webpack_require__.s = 0);
64 | /******/ })
65 | /************************************************************************/
66 | /******/ ([
67 | /* 0 */
68 | /***/ (function(module, exports, __webpack_require__) {
69 |
70 | eval("__webpack_require__(1);\n\nvar universal = __webpack_require__(2);\nvar h1 = document.createElement('h1');\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./example.js\n// module id = 0\n// module chunks = 0\n\n//# sourceURL=webpack:///./example.js?");
71 |
72 | /***/ }),
73 | /* 1 */
74 | /***/ (function(module, exports) {
75 |
76 | eval("// removed by extract-text-webpack-plugin\n\n//////////////////\n// WEBPACK FOOTER\n// ./main.css\n// module id = 1\n// module chunks = 0\n\n//# sourceURL=webpack:///./main.css?");
77 |
78 | /***/ }),
79 | /* 2 */
80 | /***/ (function(module, exports, __webpack_require__) {
81 |
82 | "use strict";
83 | eval("// This file is used for frontend and backend\n\n\n// If compiled by the html-webpack-plugin\n// HTML_WEBPACK_PLUGIN is set to true:\nvar backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined';\n\nmodule.exports = function () {\n return 'Hello World from ' + (backend ? 'backend' : 'frontend');\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./universial.js\n// module id = 2\n// module chunks = 0\n\n//# sourceURL=webpack:///./universial.js?");
84 |
85 | /***/ })
86 | /******/ ]);
--------------------------------------------------------------------------------
/examples/javascript/dist/webpack-3/index.html:
--------------------------------------------------------------------------------
1 | Hello World from backend2017-06-24T21:03:19.943Z
--------------------------------------------------------------------------------
/examples/javascript/dist/webpack-3/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/javascript/example.js:
--------------------------------------------------------------------------------
1 | require('./main.css');
2 |
3 | var universal = require('./universial.js');
4 | var h1 = document.createElement('h1');
5 | h1.innerHTML = universal();
6 |
7 | document.body.appendChild(h1);
8 |
--------------------------------------------------------------------------------
/examples/javascript/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/javascript/logo.png
--------------------------------------------------------------------------------
/examples/javascript/main.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/javascript/partial.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/javascript/readme.md:
--------------------------------------------------------------------------------
1 | # isomorphic javascript example
2 |
3 | This example shows how to generate a template on the fly using javascript.
4 |
5 | The best way to debug the compilation result is `devTool:eval`
--------------------------------------------------------------------------------
/examples/javascript/template.js:
--------------------------------------------------------------------------------
1 | // Webpack require:
2 | var partial = require('./partial.html');
3 | var universal = require('./universial.js');
4 |
5 | // Export a function / promise / or a string:
6 | module.exports = universal() + new Date().toISOString() + partial;
7 |
--------------------------------------------------------------------------------
/examples/javascript/universial.js:
--------------------------------------------------------------------------------
1 | // This file is used for frontend and backend
2 | 'use strict';
3 |
4 | // If compiled by the html-webpack-plugin
5 | // HTML_WEBPACK_PLUGIN is set to true:
6 | var backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined';
7 |
8 | module.exports = function () {
9 | return 'Hello World from ' + (backend ? 'backend' : 'frontend');
10 | };
11 |
--------------------------------------------------------------------------------
/examples/javascript/webpack.config.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var HtmlWebpackPlugin = require('../..');
3 | var ExtractTextPlugin = require('extract-text-webpack-plugin');
4 | var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
5 | module.exports = {
6 | context: __dirname,
7 | entry: './example.js',
8 | output: {
9 | path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
10 | publicPath: '',
11 | filename: 'bundle.js'
12 | },
13 | module: {
14 | loaders: [
15 | { test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') },
16 | { test: /\.png$/, loader: 'file-loader' },
17 | { test: /\.html$/, loader: 'html-loader' }
18 | ]
19 | },
20 | devtool: 'eval',
21 | plugins: [
22 | new HtmlWebpackPlugin({
23 | template: 'template.js'
24 | }),
25 | new ExtractTextPlugin('styles.css')
26 | ]
27 | };
28 |
--------------------------------------------------------------------------------
/examples/sort-manually/a.js:
--------------------------------------------------------------------------------
1 | require('./main.css');
2 | var h1 = document.createElement('h1');
3 | h1.innerHTML = 'a!';
4 | document.body.appendChild(h1);
5 |
--------------------------------------------------------------------------------
/examples/sort-manually/b.js:
--------------------------------------------------------------------------------
1 | var h1 = document.createElement('h1');
2 | h1.innerHTML = 'b!';
3 | document.body.appendChild(h1);
4 |
--------------------------------------------------------------------------------
/examples/sort-manually/c.js:
--------------------------------------------------------------------------------
1 | var h1 = document.createElement('h1');
2 | h1.innerHTML = 'c!';
3 | document.body.appendChild(h1);
4 |
--------------------------------------------------------------------------------
/examples/sort-manually/d.js:
--------------------------------------------------------------------------------
1 | var h1 = document.createElement('h1');
2 | h1.innerHTML = 'd!';
3 | document.body.appendChild(h1);
4 |
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-1/0714810ae3fb211173e2964249507195.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/sort-manually/dist/webpack-1/0714810ae3fb211173e2964249507195.png
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-1/a.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 |
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 |
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId])
10 | /******/ return installedModules[moduleId].exports;
11 |
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ exports: {},
15 | /******/ id: moduleId,
16 | /******/ loaded: false
17 | /******/ };
18 |
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 |
22 | /******/ // Flag the module as loaded
23 | /******/ module.loaded = true;
24 |
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 |
29 |
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 |
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 |
36 | /******/ // __webpack_public_path__
37 | /******/ __webpack_require__.p = "";
38 |
39 | /******/ // Load entry module and return exports
40 | /******/ return __webpack_require__(0);
41 | /******/ })
42 | /************************************************************************/
43 | /******/ ([
44 | /* 0 */
45 | /***/ (function(module, exports, __webpack_require__) {
46 |
47 | __webpack_require__(1);
48 | var h1 = document.createElement('h1');
49 | h1.innerHTML = 'a!';
50 | document.body.appendChild(h1);
51 |
52 |
53 | /***/ }),
54 | /* 1 */
55 | /***/ (function(module, exports) {
56 |
57 | // removed by extract-text-webpack-plugin
58 |
59 | /***/ })
60 | /******/ ]);
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-1/b.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 |
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 |
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId])
10 | /******/ return installedModules[moduleId].exports;
11 |
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ exports: {},
15 | /******/ id: moduleId,
16 | /******/ loaded: false
17 | /******/ };
18 |
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 |
22 | /******/ // Flag the module as loaded
23 | /******/ module.loaded = true;
24 |
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 |
29 |
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 |
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 |
36 | /******/ // __webpack_public_path__
37 | /******/ __webpack_require__.p = "";
38 |
39 | /******/ // Load entry module and return exports
40 | /******/ return __webpack_require__(0);
41 | /******/ })
42 | /************************************************************************/
43 | /******/ ([
44 | /* 0 */
45 | /***/ (function(module, exports) {
46 |
47 | var h1 = document.createElement('h1');
48 | h1.innerHTML = 'b!';
49 | document.body.appendChild(h1);
50 |
51 |
52 | /***/ })
53 | /******/ ]);
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-1/c.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 |
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 |
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId])
10 | /******/ return installedModules[moduleId].exports;
11 |
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ exports: {},
15 | /******/ id: moduleId,
16 | /******/ loaded: false
17 | /******/ };
18 |
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 |
22 | /******/ // Flag the module as loaded
23 | /******/ module.loaded = true;
24 |
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 |
29 |
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 |
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 |
36 | /******/ // __webpack_public_path__
37 | /******/ __webpack_require__.p = "";
38 |
39 | /******/ // Load entry module and return exports
40 | /******/ return __webpack_require__(0);
41 | /******/ })
42 | /************************************************************************/
43 | /******/ ([
44 | /* 0 */
45 | /***/ (function(module, exports) {
46 |
47 | var h1 = document.createElement('h1');
48 | h1.innerHTML = 'c!';
49 | document.body.appendChild(h1);
50 |
51 |
52 | /***/ })
53 | /******/ ]);
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-1/d.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 |
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 |
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId])
10 | /******/ return installedModules[moduleId].exports;
11 |
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ exports: {},
15 | /******/ id: moduleId,
16 | /******/ loaded: false
17 | /******/ };
18 |
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 |
22 | /******/ // Flag the module as loaded
23 | /******/ module.loaded = true;
24 |
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 |
29 |
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 |
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 |
36 | /******/ // __webpack_public_path__
37 | /******/ __webpack_require__.p = "";
38 |
39 | /******/ // Load entry module and return exports
40 | /******/ return __webpack_require__(0);
41 | /******/ })
42 | /************************************************************************/
43 | /******/ ([
44 | /* 0 */
45 | /***/ (function(module, exports) {
46 |
47 | var h1 = document.createElement('h1');
48 | h1.innerHTML = 'd!';
49 | document.body.appendChild(h1);
50 |
51 |
52 | /***/ })
53 | /******/ ]);
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-1/e.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 |
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 |
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId])
10 | /******/ return installedModules[moduleId].exports;
11 |
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ exports: {},
15 | /******/ id: moduleId,
16 | /******/ loaded: false
17 | /******/ };
18 |
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 |
22 | /******/ // Flag the module as loaded
23 | /******/ module.loaded = true;
24 |
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 |
29 |
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 |
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 |
36 | /******/ // __webpack_public_path__
37 | /******/ __webpack_require__.p = "";
38 |
39 | /******/ // Load entry module and return exports
40 | /******/ return __webpack_require__(0);
41 | /******/ })
42 | /************************************************************************/
43 | /******/ ([
44 | /* 0 */
45 | /***/ (function(module, exports) {
46 |
47 | var h1 = document.createElement('h1');
48 | h1.innerHTML = 'e!';
49 | document.body.appendChild(h1);
50 |
51 |
52 | /***/ })
53 | /******/ ]);
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-1/first-file.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-1/second-file.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-1/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-2/0714810ae3fb211173e2964249507195.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/sort-manually/dist/webpack-2/0714810ae3fb211173e2964249507195.png
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-2/a.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // identity function for calling harmony imports with the correct context
37 | /******/ __webpack_require__.i = function(value) { return value; };
38 | /******/
39 | /******/ // define getter function for harmony exports
40 | /******/ __webpack_require__.d = function(exports, name, getter) {
41 | /******/ if(!__webpack_require__.o(exports, name)) {
42 | /******/ Object.defineProperty(exports, name, {
43 | /******/ configurable: false,
44 | /******/ enumerable: true,
45 | /******/ get: getter
46 | /******/ });
47 | /******/ }
48 | /******/ };
49 | /******/
50 | /******/ // getDefaultExport function for compatibility with non-harmony modules
51 | /******/ __webpack_require__.n = function(module) {
52 | /******/ var getter = module && module.__esModule ?
53 | /******/ function getDefault() { return module['default']; } :
54 | /******/ function getModuleExports() { return module; };
55 | /******/ __webpack_require__.d(getter, 'a', getter);
56 | /******/ return getter;
57 | /******/ };
58 | /******/
59 | /******/ // Object.prototype.hasOwnProperty.call
60 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
61 | /******/
62 | /******/ // __webpack_public_path__
63 | /******/ __webpack_require__.p = "";
64 | /******/
65 | /******/ // Load entry module and return exports
66 | /******/ return __webpack_require__(__webpack_require__.s = 1);
67 | /******/ })
68 | /************************************************************************/
69 | /******/ ([
70 | /* 0 */
71 | /***/ (function(module, exports) {
72 |
73 | // removed by extract-text-webpack-plugin
74 |
75 | /***/ }),
76 | /* 1 */
77 | /***/ (function(module, exports, __webpack_require__) {
78 |
79 | __webpack_require__(0);
80 | var h1 = document.createElement('h1');
81 | h1.innerHTML = 'a!';
82 | document.body.appendChild(h1);
83 |
84 |
85 | /***/ })
86 | /******/ ]);
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-2/b.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // identity function for calling harmony imports with the correct context
37 | /******/ __webpack_require__.i = function(value) { return value; };
38 | /******/
39 | /******/ // define getter function for harmony exports
40 | /******/ __webpack_require__.d = function(exports, name, getter) {
41 | /******/ if(!__webpack_require__.o(exports, name)) {
42 | /******/ Object.defineProperty(exports, name, {
43 | /******/ configurable: false,
44 | /******/ enumerable: true,
45 | /******/ get: getter
46 | /******/ });
47 | /******/ }
48 | /******/ };
49 | /******/
50 | /******/ // getDefaultExport function for compatibility with non-harmony modules
51 | /******/ __webpack_require__.n = function(module) {
52 | /******/ var getter = module && module.__esModule ?
53 | /******/ function getDefault() { return module['default']; } :
54 | /******/ function getModuleExports() { return module; };
55 | /******/ __webpack_require__.d(getter, 'a', getter);
56 | /******/ return getter;
57 | /******/ };
58 | /******/
59 | /******/ // Object.prototype.hasOwnProperty.call
60 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
61 | /******/
62 | /******/ // __webpack_public_path__
63 | /******/ __webpack_require__.p = "";
64 | /******/
65 | /******/ // Load entry module and return exports
66 | /******/ return __webpack_require__(__webpack_require__.s = 2);
67 | /******/ })
68 | /************************************************************************/
69 | /******/ ({
70 |
71 | /***/ 2:
72 | /***/ (function(module, exports) {
73 |
74 | var h1 = document.createElement('h1');
75 | h1.innerHTML = 'b!';
76 | document.body.appendChild(h1);
77 |
78 |
79 | /***/ })
80 |
81 | /******/ });
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-2/c.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // identity function for calling harmony imports with the correct context
37 | /******/ __webpack_require__.i = function(value) { return value; };
38 | /******/
39 | /******/ // define getter function for harmony exports
40 | /******/ __webpack_require__.d = function(exports, name, getter) {
41 | /******/ if(!__webpack_require__.o(exports, name)) {
42 | /******/ Object.defineProperty(exports, name, {
43 | /******/ configurable: false,
44 | /******/ enumerable: true,
45 | /******/ get: getter
46 | /******/ });
47 | /******/ }
48 | /******/ };
49 | /******/
50 | /******/ // getDefaultExport function for compatibility with non-harmony modules
51 | /******/ __webpack_require__.n = function(module) {
52 | /******/ var getter = module && module.__esModule ?
53 | /******/ function getDefault() { return module['default']; } :
54 | /******/ function getModuleExports() { return module; };
55 | /******/ __webpack_require__.d(getter, 'a', getter);
56 | /******/ return getter;
57 | /******/ };
58 | /******/
59 | /******/ // Object.prototype.hasOwnProperty.call
60 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
61 | /******/
62 | /******/ // __webpack_public_path__
63 | /******/ __webpack_require__.p = "";
64 | /******/
65 | /******/ // Load entry module and return exports
66 | /******/ return __webpack_require__(__webpack_require__.s = 3);
67 | /******/ })
68 | /************************************************************************/
69 | /******/ ({
70 |
71 | /***/ 3:
72 | /***/ (function(module, exports) {
73 |
74 | var h1 = document.createElement('h1');
75 | h1.innerHTML = 'c!';
76 | document.body.appendChild(h1);
77 |
78 |
79 | /***/ })
80 |
81 | /******/ });
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-2/d.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // identity function for calling harmony imports with the correct context
37 | /******/ __webpack_require__.i = function(value) { return value; };
38 | /******/
39 | /******/ // define getter function for harmony exports
40 | /******/ __webpack_require__.d = function(exports, name, getter) {
41 | /******/ if(!__webpack_require__.o(exports, name)) {
42 | /******/ Object.defineProperty(exports, name, {
43 | /******/ configurable: false,
44 | /******/ enumerable: true,
45 | /******/ get: getter
46 | /******/ });
47 | /******/ }
48 | /******/ };
49 | /******/
50 | /******/ // getDefaultExport function for compatibility with non-harmony modules
51 | /******/ __webpack_require__.n = function(module) {
52 | /******/ var getter = module && module.__esModule ?
53 | /******/ function getDefault() { return module['default']; } :
54 | /******/ function getModuleExports() { return module; };
55 | /******/ __webpack_require__.d(getter, 'a', getter);
56 | /******/ return getter;
57 | /******/ };
58 | /******/
59 | /******/ // Object.prototype.hasOwnProperty.call
60 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
61 | /******/
62 | /******/ // __webpack_public_path__
63 | /******/ __webpack_require__.p = "";
64 | /******/
65 | /******/ // Load entry module and return exports
66 | /******/ return __webpack_require__(__webpack_require__.s = 4);
67 | /******/ })
68 | /************************************************************************/
69 | /******/ ({
70 |
71 | /***/ 4:
72 | /***/ (function(module, exports) {
73 |
74 | var h1 = document.createElement('h1');
75 | h1.innerHTML = 'd!';
76 | document.body.appendChild(h1);
77 |
78 |
79 | /***/ })
80 |
81 | /******/ });
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-2/e.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // identity function for calling harmony imports with the correct context
37 | /******/ __webpack_require__.i = function(value) { return value; };
38 | /******/
39 | /******/ // define getter function for harmony exports
40 | /******/ __webpack_require__.d = function(exports, name, getter) {
41 | /******/ if(!__webpack_require__.o(exports, name)) {
42 | /******/ Object.defineProperty(exports, name, {
43 | /******/ configurable: false,
44 | /******/ enumerable: true,
45 | /******/ get: getter
46 | /******/ });
47 | /******/ }
48 | /******/ };
49 | /******/
50 | /******/ // getDefaultExport function for compatibility with non-harmony modules
51 | /******/ __webpack_require__.n = function(module) {
52 | /******/ var getter = module && module.__esModule ?
53 | /******/ function getDefault() { return module['default']; } :
54 | /******/ function getModuleExports() { return module; };
55 | /******/ __webpack_require__.d(getter, 'a', getter);
56 | /******/ return getter;
57 | /******/ };
58 | /******/
59 | /******/ // Object.prototype.hasOwnProperty.call
60 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
61 | /******/
62 | /******/ // __webpack_public_path__
63 | /******/ __webpack_require__.p = "";
64 | /******/
65 | /******/ // Load entry module and return exports
66 | /******/ return __webpack_require__(__webpack_require__.s = 5);
67 | /******/ })
68 | /************************************************************************/
69 | /******/ ({
70 |
71 | /***/ 5:
72 | /***/ (function(module, exports) {
73 |
74 | var h1 = document.createElement('h1');
75 | h1.innerHTML = 'e!';
76 | document.body.appendChild(h1);
77 |
78 |
79 | /***/ })
80 |
81 | /******/ });
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-2/first-file.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-2/second-file.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-2/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-3/0714810ae3fb211173e2964249507195.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/sort-manually/dist/webpack-3/0714810ae3fb211173e2964249507195.png
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-3/a.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // define getter function for harmony exports
37 | /******/ __webpack_require__.d = function(exports, name, getter) {
38 | /******/ if(!__webpack_require__.o(exports, name)) {
39 | /******/ Object.defineProperty(exports, name, {
40 | /******/ configurable: false,
41 | /******/ enumerable: true,
42 | /******/ get: getter
43 | /******/ });
44 | /******/ }
45 | /******/ };
46 | /******/
47 | /******/ // getDefaultExport function for compatibility with non-harmony modules
48 | /******/ __webpack_require__.n = function(module) {
49 | /******/ var getter = module && module.__esModule ?
50 | /******/ function getDefault() { return module['default']; } :
51 | /******/ function getModuleExports() { return module; };
52 | /******/ __webpack_require__.d(getter, 'a', getter);
53 | /******/ return getter;
54 | /******/ };
55 | /******/
56 | /******/ // Object.prototype.hasOwnProperty.call
57 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58 | /******/
59 | /******/ // __webpack_public_path__
60 | /******/ __webpack_require__.p = "";
61 | /******/
62 | /******/ // Load entry module and return exports
63 | /******/ return __webpack_require__(__webpack_require__.s = 2);
64 | /******/ })
65 | /************************************************************************/
66 | /******/ ([
67 | /* 0 */,
68 | /* 1 */,
69 | /* 2 */
70 | /***/ (function(module, exports, __webpack_require__) {
71 |
72 | __webpack_require__(3);
73 | var h1 = document.createElement('h1');
74 | h1.innerHTML = 'a!';
75 | document.body.appendChild(h1);
76 |
77 |
78 | /***/ }),
79 | /* 3 */
80 | /***/ (function(module, exports) {
81 |
82 | // removed by extract-text-webpack-plugin
83 |
84 | /***/ })
85 | /******/ ]);
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-3/b.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // define getter function for harmony exports
37 | /******/ __webpack_require__.d = function(exports, name, getter) {
38 | /******/ if(!__webpack_require__.o(exports, name)) {
39 | /******/ Object.defineProperty(exports, name, {
40 | /******/ configurable: false,
41 | /******/ enumerable: true,
42 | /******/ get: getter
43 | /******/ });
44 | /******/ }
45 | /******/ };
46 | /******/
47 | /******/ // getDefaultExport function for compatibility with non-harmony modules
48 | /******/ __webpack_require__.n = function(module) {
49 | /******/ var getter = module && module.__esModule ?
50 | /******/ function getDefault() { return module['default']; } :
51 | /******/ function getModuleExports() { return module; };
52 | /******/ __webpack_require__.d(getter, 'a', getter);
53 | /******/ return getter;
54 | /******/ };
55 | /******/
56 | /******/ // Object.prototype.hasOwnProperty.call
57 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58 | /******/
59 | /******/ // __webpack_public_path__
60 | /******/ __webpack_require__.p = "";
61 | /******/
62 | /******/ // Load entry module and return exports
63 | /******/ return __webpack_require__(__webpack_require__.s = 0);
64 | /******/ })
65 | /************************************************************************/
66 | /******/ ([
67 | /* 0 */
68 | /***/ (function(module, exports) {
69 |
70 | var h1 = document.createElement('h1');
71 | h1.innerHTML = 'b!';
72 | document.body.appendChild(h1);
73 |
74 |
75 | /***/ })
76 | /******/ ]);
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-3/c.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // define getter function for harmony exports
37 | /******/ __webpack_require__.d = function(exports, name, getter) {
38 | /******/ if(!__webpack_require__.o(exports, name)) {
39 | /******/ Object.defineProperty(exports, name, {
40 | /******/ configurable: false,
41 | /******/ enumerable: true,
42 | /******/ get: getter
43 | /******/ });
44 | /******/ }
45 | /******/ };
46 | /******/
47 | /******/ // getDefaultExport function for compatibility with non-harmony modules
48 | /******/ __webpack_require__.n = function(module) {
49 | /******/ var getter = module && module.__esModule ?
50 | /******/ function getDefault() { return module['default']; } :
51 | /******/ function getModuleExports() { return module; };
52 | /******/ __webpack_require__.d(getter, 'a', getter);
53 | /******/ return getter;
54 | /******/ };
55 | /******/
56 | /******/ // Object.prototype.hasOwnProperty.call
57 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58 | /******/
59 | /******/ // __webpack_public_path__
60 | /******/ __webpack_require__.p = "";
61 | /******/
62 | /******/ // Load entry module and return exports
63 | /******/ return __webpack_require__(__webpack_require__.s = 4);
64 | /******/ })
65 | /************************************************************************/
66 | /******/ ({
67 |
68 | /***/ 4:
69 | /***/ (function(module, exports) {
70 |
71 | var h1 = document.createElement('h1');
72 | h1.innerHTML = 'c!';
73 | document.body.appendChild(h1);
74 |
75 |
76 | /***/ })
77 |
78 | /******/ });
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-3/d.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // define getter function for harmony exports
37 | /******/ __webpack_require__.d = function(exports, name, getter) {
38 | /******/ if(!__webpack_require__.o(exports, name)) {
39 | /******/ Object.defineProperty(exports, name, {
40 | /******/ configurable: false,
41 | /******/ enumerable: true,
42 | /******/ get: getter
43 | /******/ });
44 | /******/ }
45 | /******/ };
46 | /******/
47 | /******/ // getDefaultExport function for compatibility with non-harmony modules
48 | /******/ __webpack_require__.n = function(module) {
49 | /******/ var getter = module && module.__esModule ?
50 | /******/ function getDefault() { return module['default']; } :
51 | /******/ function getModuleExports() { return module; };
52 | /******/ __webpack_require__.d(getter, 'a', getter);
53 | /******/ return getter;
54 | /******/ };
55 | /******/
56 | /******/ // Object.prototype.hasOwnProperty.call
57 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58 | /******/
59 | /******/ // __webpack_public_path__
60 | /******/ __webpack_require__.p = "";
61 | /******/
62 | /******/ // Load entry module and return exports
63 | /******/ return __webpack_require__(__webpack_require__.s = 1);
64 | /******/ })
65 | /************************************************************************/
66 | /******/ ([
67 | /* 0 */,
68 | /* 1 */
69 | /***/ (function(module, exports) {
70 |
71 | var h1 = document.createElement('h1');
72 | h1.innerHTML = 'd!';
73 | document.body.appendChild(h1);
74 |
75 |
76 | /***/ })
77 | /******/ ]);
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-3/e.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 | /******/
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 | /******/
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId]) {
10 | /******/ return installedModules[moduleId].exports;
11 | /******/ }
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ i: moduleId,
15 | /******/ l: false,
16 | /******/ exports: {}
17 | /******/ };
18 | /******/
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 | /******/
22 | /******/ // Flag the module as loaded
23 | /******/ module.l = true;
24 | /******/
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 | /******/
29 | /******/
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 | /******/
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 | /******/
36 | /******/ // define getter function for harmony exports
37 | /******/ __webpack_require__.d = function(exports, name, getter) {
38 | /******/ if(!__webpack_require__.o(exports, name)) {
39 | /******/ Object.defineProperty(exports, name, {
40 | /******/ configurable: false,
41 | /******/ enumerable: true,
42 | /******/ get: getter
43 | /******/ });
44 | /******/ }
45 | /******/ };
46 | /******/
47 | /******/ // getDefaultExport function for compatibility with non-harmony modules
48 | /******/ __webpack_require__.n = function(module) {
49 | /******/ var getter = module && module.__esModule ?
50 | /******/ function getDefault() { return module['default']; } :
51 | /******/ function getModuleExports() { return module; };
52 | /******/ __webpack_require__.d(getter, 'a', getter);
53 | /******/ return getter;
54 | /******/ };
55 | /******/
56 | /******/ // Object.prototype.hasOwnProperty.call
57 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58 | /******/
59 | /******/ // __webpack_public_path__
60 | /******/ __webpack_require__.p = "";
61 | /******/
62 | /******/ // Load entry module and return exports
63 | /******/ return __webpack_require__(__webpack_require__.s = 5);
64 | /******/ })
65 | /************************************************************************/
66 | /******/ ({
67 |
68 | /***/ 5:
69 | /***/ (function(module, exports) {
70 |
71 | var h1 = document.createElement('h1');
72 | h1.innerHTML = 'e!';
73 | document.body.appendChild(h1);
74 |
75 |
76 | /***/ })
77 |
78 | /******/ });
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-3/first-file.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-3/second-file.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/sort-manually/dist/webpack-3/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/sort-manually/e.js:
--------------------------------------------------------------------------------
1 | var h1 = document.createElement('h1');
2 | h1.innerHTML = 'e!';
3 | document.body.appendChild(h1);
4 |
--------------------------------------------------------------------------------
/examples/sort-manually/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daifee/html-webpack-plugin-for-multihtml/HEAD/examples/sort-manually/logo.png
--------------------------------------------------------------------------------
/examples/sort-manually/main.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: snow;
3 | }
--------------------------------------------------------------------------------
/examples/sort-manually/template.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/sort-manually/webpack.config.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var HtmlWebpackPlugin = require('../..');
3 | var ExtractTextPlugin = require('extract-text-webpack-plugin');
4 | var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
5 | module.exports = {
6 | context: __dirname,
7 | entry: {
8 | b: './b.js',
9 | d: './d.js',
10 | a: './a.js',
11 | c: './c.js',
12 | e: './e.js'
13 | },
14 | output: {
15 | path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
16 | publicPath: '',
17 | filename: '[name].js'
18 | },
19 | module: {
20 | loaders: [
21 | { test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') },
22 | { test: /\.png$/, loader: 'file-loader' },
23 | { test: /\.html$/, loader: 'html-loader' }
24 | ]
25 | },
26 | plugins: [
27 | new HtmlWebpackPlugin({
28 | inject: true,
29 | filename: 'first-file.html',
30 | template: 'template.html',
31 | chunksSortMode: 'manual',
32 | chunks: ['a', 'b', 'c']
33 | }),
34 | new HtmlWebpackPlugin({
35 | inject: true,
36 | filename: 'second-file.html',
37 | template: 'template.html',
38 | chunksSortMode: 'manual',
39 | chunks: ['a', 'b', 'd']
40 | }),
41 | new ExtractTextPlugin('styles.css')
42 | ]
43 | };
44 |
--------------------------------------------------------------------------------
/lib/chunksorter.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var toposort = require('toposort');
4 | var _ = require('lodash');
5 |
6 | /*
7 | Sorts dependencies between chunks by their "parents" attribute.
8 |
9 | This function sorts chunks based on their dependencies with each other.
10 | The parent relation between chunks as generated by Webpack for each chunk
11 | is used to define a directed (and hopefully acyclic) graph, which is then
12 | topologically sorted in order to retrieve the correct order in which
13 | chunks need to be embedded into HTML. A directed edge in this graph is
14 | describing a "is parent of" relationship from a chunk to another (distinct)
15 | chunk. Thus topological sorting orders chunks from bottom-layer chunks to
16 | highest level chunks that use the lower-level chunks.
17 |
18 | @param {Array} chunks an array of chunks as generated by the html-webpack-plugin.
19 | It is assumed that each entry contains at least the properties "id"
20 | (containing the chunk id) and "parents" (array containing the ids of the
21 | parent chunks).
22 |
23 | @return {Array} A topologically sorted version of the input chunks
24 | */
25 | module.exports.dependency = function (chunks) {
26 | if (!chunks) {
27 | return chunks;
28 | }
29 |
30 | // We build a map (chunk-id -> chunk) for faster access during graph building.
31 | var nodeMap = {};
32 |
33 | chunks.forEach(function (chunk) {
34 | nodeMap[chunk.id] = chunk;
35 | });
36 |
37 | // Next, we add an edge for each parent relationship into the graph
38 | var edges = [];
39 |
40 | chunks.forEach(function (chunk) {
41 | if (chunk.parents) {
42 | // Add an edge for each parent (parent -> child)
43 | chunk.parents.forEach(function (parentId) {
44 | // webpack2 chunk.parents are chunks instead of string id(s)
45 | var parentChunk = _.isObject(parentId) ? parentId : nodeMap[parentId];
46 | // If the parent chunk does not exist (e.g. because of an excluded chunk)
47 | // we ignore that parent
48 | if (parentChunk) {
49 | edges.push([parentChunk, chunk]);
50 | }
51 | });
52 | }
53 | });
54 | // We now perform a topological sorting on the input chunks and built edges
55 | return toposort.array(chunks, edges);
56 | };
57 |
58 | /**
59 | * Sorts the chunks based on the chunk id.
60 | *
61 | * @param {Array} chunks the list of chunks to sort
62 | * @return {Array} The sorted list of chunks
63 | */
64 | module.exports.id = function (chunks) {
65 | return chunks.sort(function orderEntryLast (a, b) {
66 | if (a.entry !== b.entry) {
67 | return b.entry ? 1 : -1;
68 | } else {
69 | return b.id - a.id;
70 | }
71 | });
72 | };
73 |
74 | /**
75 | * Performs identity mapping (no-sort).
76 | * @param {Array} chunks the chunks to sort
77 | * @return {Array} The sorted chunks
78 | */
79 | module.exports.none = function (chunks) {
80 | return chunks;
81 | };
82 |
83 | /**
84 | * Sort manually by the chunks
85 | * @param {Array} chunks the chunks to sort
86 | * @return {Array} The sorted chunks
87 | */
88 | module.exports.manual = function (chunks, specifyChunks) {
89 | var chunksResult = [];
90 | var filterResult = [];
91 | if (Array.isArray(specifyChunks)) {
92 | for (var i = 0; i < specifyChunks.length; i++) {
93 | filterResult = chunks.filter(function (chunk) {
94 | if (chunk.names[0] && chunk.names[0] === specifyChunks[i]) {
95 | return true;
96 | }
97 | return false;
98 | });
99 | filterResult.length > 0 && chunksResult.push(filterResult[0]);
100 | }
101 | }
102 | return chunksResult;
103 | };
104 |
105 | /**
106 | * Defines the default sorter.
107 | */
108 | module.exports.auto = module.exports.id;
109 |
110 | // In webpack 2 the ids have been flipped.
111 | // Therefore the id sort doesn't work the same way as it did for webpack 1
112 | // Luckily the dependency sort is working as expected
113 | if (Number(require('webpack/package.json').version.split('.')[0]) > 1) {
114 | module.exports.auto = module.exports.dependency;
115 | }
116 |
--------------------------------------------------------------------------------
/lib/compiler.js:
--------------------------------------------------------------------------------
1 | /*
2 | * This file uses webpack to compile a template with a child compiler.
3 | *
4 | * [TEMPLATE] -> [JAVASCRIPT]
5 | *
6 | */
7 | 'use strict';
8 | var Promise = require('bluebird');
9 | var _ = require('lodash');
10 | var path = require('path');
11 | var NodeTemplatePlugin = require('webpack/lib/node/NodeTemplatePlugin');
12 | var NodeTargetPlugin = require('webpack/lib/node/NodeTargetPlugin');
13 | var LoaderTargetPlugin = require('webpack/lib/LoaderTargetPlugin');
14 | var LibraryTemplatePlugin = require('webpack/lib/LibraryTemplatePlugin');
15 | var SingleEntryPlugin = require('webpack/lib/SingleEntryPlugin');
16 |
17 | /**
18 | * Compiles the template into a nodejs factory, adds its to the compilation.assets
19 | * and returns a promise of the result asset object.
20 | *
21 | * @param template relative path to the template file
22 | * @param context path context
23 | * @param outputFilename the file name
24 | * @param compilation The webpack compilation object
25 | *
26 | * Returns an object:
27 | * {
28 | * hash: {String} - Base64 hash of the file
29 | * content: {String} - Javascript executable code of the template
30 | * }
31 | *
32 | */
33 | module.exports.compileTemplate = function compileTemplate (template, context, outputFilename, compilation) {
34 | // The entry file is just an empty helper as the dynamic template
35 | // require is added in "loader.js"
36 | var outputOptions = {
37 | filename: outputFilename,
38 | publicPath: compilation.outputOptions.publicPath
39 | };
40 | // Store the result of the parent compilation before we start the child compilation
41 | var assetsBeforeCompilation = _.assign({}, compilation.assets[outputOptions.filename]);
42 | // Create an additional child compiler which takes the template
43 | // and turns it into an Node.JS html factory.
44 | // This allows us to use loaders during the compilation
45 | var compilerName = getCompilerName(context, outputFilename);
46 | var childCompiler = compilation.createChildCompiler(compilerName, outputOptions);
47 | childCompiler.context = context;
48 | childCompiler.apply(
49 | new NodeTemplatePlugin(outputOptions),
50 | new NodeTargetPlugin(),
51 | new LibraryTemplatePlugin('HTML_WEBPACK_PLUGIN_RESULT', 'var'),
52 | new SingleEntryPlugin(this.context, template),
53 | new LoaderTargetPlugin('node')
54 | );
55 |
56 | // Fix for "Uncaught TypeError: __webpack_require__(...) is not a function"
57 | // Hot module replacement requires that every child compiler has its own
58 | // cache. @see https://github.com/ampedandwired/html-webpack-plugin/pull/179
59 | childCompiler.plugin('compilation', function (compilation) {
60 | if (compilation.cache) {
61 | if (!compilation.cache[compilerName]) {
62 | compilation.cache[compilerName] = {};
63 | }
64 | compilation.cache = compilation.cache[compilerName];
65 | }
66 | });
67 |
68 | // Compile and return a promise
69 | return new Promise(function (resolve, reject) {
70 | childCompiler.runAsChild(function (err, entries, childCompilation) {
71 | // Resolve / reject the promise
72 | if (childCompilation && childCompilation.errors && childCompilation.errors.length) {
73 | var errorDetails = childCompilation.errors.map(function (error) {
74 | return error.message + (error.error ? ':\n' + error.error : '');
75 | }).join('\n');
76 | reject(new Error('Child compilation failed:\n' + errorDetails));
77 | } else if (err) {
78 | reject(err);
79 | } else {
80 | // Replace [hash] placeholders in filename
81 | var outputName = compilation.mainTemplate.applyPluginsWaterfall('asset-path', outputOptions.filename, {
82 | hash: childCompilation.hash,
83 | chunk: entries[0]
84 | });
85 | // Restore the parent compilation to the state like it
86 | // was before the child compilation
87 | compilation.assets[outputName] = assetsBeforeCompilation[outputName];
88 | if (assetsBeforeCompilation[outputName] === undefined) {
89 | // If it wasn't there - delete it
90 | delete compilation.assets[outputName];
91 | }
92 | resolve({
93 | // Hash of the template entry point
94 | hash: entries[0].hash,
95 | // Output name
96 | outputName: outputName,
97 | // Compiled code
98 | content: childCompilation.assets[outputName].source(),
99 | // childCompilation for multipageCache
100 | childCompilation: childCompilation
101 | });
102 | }
103 | });
104 | });
105 | };
106 |
107 | /**
108 | * Returns the child compiler name e.g. 'html-webpack-plugin for "index.html"'
109 | */
110 | function getCompilerName (context, filename) {
111 | var absolutePath = path.resolve(context, filename);
112 | var relativePath = path.relative(context, absolutePath);
113 | return 'html-webpack-plugin for "' + (absolutePath.length < relativePath.length ? absolutePath : relativePath) + '"';
114 | }
115 |
--------------------------------------------------------------------------------
/lib/errors.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | var PrettyError = require('pretty-error');
3 | var prettyError = new PrettyError();
4 | prettyError.withoutColors();
5 | prettyError.skipPackage(['html-plugin-evaluation']);
6 | prettyError.skipNodeFiles();
7 | prettyError.skip(function (traceLine) {
8 | return traceLine.path === 'html-plugin-evaluation';
9 | });
10 |
11 | module.exports = function (err, context) {
12 | return {
13 | toHtml: function () {
14 | return 'Html Webpack Plugin:\n\n' + this.toString() + ''; 15 | }, 16 | toJsonHtml: function () { 17 | return JSON.stringify(this.toHtml()); 18 | }, 19 | toString: function () { 20 | return prettyError.render(err).replace(/webpack:\/\/\/\./g, context); 21 | } 22 | }; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/loader.js: -------------------------------------------------------------------------------- 1 | /* This loader renders the template with underscore if no other loader was found */ 2 | 'use strict'; 3 | 4 | var _ = require('lodash'); 5 | var loaderUtils = require('loader-utils'); 6 | 7 | module.exports = function (source) { 8 | if (this.cacheable) { 9 | this.cacheable(); 10 | } 11 | var allLoadersButThisOne = this.loaders.filter(function (loader) { 12 | // Loader API changed from `loader.module` to `loader.normal` in Webpack 2. 13 | return (loader.module || loader.normal) !== module.exports; 14 | }); 15 | // This loader shouldn't kick in if there is any other loader 16 | if (allLoadersButThisOne.length > 0) { 17 | return source; 18 | } 19 | // Skip .js files 20 | if (/\.js$/.test(this.resourcePath)) { 21 | return source; 22 | } 23 | 24 | // The following part renders the tempalte with lodash as aminimalistic loader 25 | // 26 | // Get templating options 27 | var options = loaderUtils.parseQuery(this.query); 28 | // Webpack 2 does not allow with() statements, which lodash templates use to unwrap 29 | // the parameters passed to the compiled template inside the scope. We therefore 30 | // need to unwrap them ourselves here. This is essentially what lodash does internally 31 | // To tell lodash it should not use with we set a variable 32 | var template = _.template(source, _.defaults(options, { variable: 'data' })); 33 | // All templateVariables which should be available 34 | // @see HtmlWebpackPlugin.prototype.executeTemplate 35 | var templateVariables = [ 36 | 'compilation', 37 | 'webpack', 38 | 'webpackConfig', 39 | 'htmlWebpackPlugin' 40 | ]; 41 | return 'var _ = require(' + loaderUtils.stringifyRequest(this, require.resolve('lodash')) + ');' + 42 | 'module.exports = function (templateParams) {' + 43 | // Declare the template variables in the outer scope of the 44 | // lodash template to unwrap them 45 | templateVariables.map(function (variableName) { 46 | return 'var ' + variableName + ' = templateParams.' + variableName; 47 | }).join(';') + ';' + 48 | // Execute the lodash template 49 | 'return (' + template.source + ')();' + 50 | '}'; 51 | }; 52 | -------------------------------------------------------------------------------- /migration.md: -------------------------------------------------------------------------------- 1 | # Migrating from 1.x to 2.x 2 | 3 | ## Default config 4 | 5 | https://github.com/ampedandwired/html-webpack-plugin/tree/master/examples/default 6 | 7 | As of 2.x the `inject` options is set to true by default which means that all your javascript, css files and manifest files are injected automatically. See https://github.com/ampedandwired/html-webpack-plugin#configuration 8 | 9 | The default template has changed according to the inject option - but should behave like the previous version did. 10 | 11 | 12 | ```js 13 | var HtmlWebpackPlugin = require('html-webpack-plugin'); 14 | 15 | module.exports = { 16 | // ... 17 | plugins: [ 18 | new HtmlWebpackPlugin() 19 | ] 20 | }; 21 | ``` 22 | 23 | ## Custom template 24 | 25 | This inject feature aims to simpify your custom templates: 26 | https://github.com/ampedandwired/html-webpack-plugin/tree/master/examples/custom-template 27 | 28 | ```js 29 | var HtmlWebpackPlugin = require('html-webpack-plugin'); 30 | 31 | module.exports = { 32 | // ... 33 | plugins: [ 34 | new HtmlWebpackPlugin({ 35 | template: 'template.html' 36 | }) 37 | ] 38 | }; 39 | ``` 40 | 41 | ```html 42 | 43 | 44 | 45 | 46 |
index.js
'; 10 | -------------------------------------------------------------------------------- /spec/fixtures/invalid.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |Some unique text
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/legacy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |Some unique text
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/main.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: snow; 3 | } -------------------------------------------------------------------------------- /spec/fixtures/plain.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |Some unique text
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/theme.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('./main.css'); 4 | require('./index.js'); 5 | -------------------------------------------------------------------------------- /spec/fixtures/util.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('./common'); 4 | document.body.innerHTML = document.body.innerHTML + 'util.js
'; 5 | -------------------------------------------------------------------------------- /spec/fixtures/webpackconfig.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |Public path is <%= webpackConfig.output.publicPath %>
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spec/support/jasmine.json: -------------------------------------------------------------------------------- 1 | { 2 | "spec_dir": "spec", 3 | "spec_files": [ 4 | "**/*[sS]pec.js" 5 | ], 6 | "stopSpecOnExpectationFailure": false, 7 | "random": true 8 | } 9 | --------------------------------------------------------------------------------