make test passes for webpack@1 and webapck@2 (#642)
* test(ci): start testing using webpack@2 * test(examples): update examples output files * chore(travis): remove deprecaded node versions
This commit is contained in:
parent
7a43f1043a
commit
9b272cfb2b
|
|
@ -1,17 +1,17 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- "0.12"
|
||||
- "0.10"
|
||||
- "4"
|
||||
- "5"
|
||||
- "6"
|
||||
env:
|
||||
- WEBPACK=webpack@1
|
||||
- WEBPACK_VERSION=1
|
||||
- WEBPACK_VERSION=2
|
||||
before_install:
|
||||
- stty columns 120
|
||||
install:
|
||||
- npm install --ignore-scripts
|
||||
- npm rm webpack
|
||||
- npm install $WEBPACK --ignore-scripts || true
|
||||
- npm rm extract-text-webpack-plugin
|
||||
- npm install webpack@$WEBPACK_VERSION extract-text-webpack-plugin@$WEBPACK_VERSION --ignore-scripts || true
|
||||
script:
|
||||
- npm test
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(1);
|
||||
var h1 = document.createElement('h1');
|
||||
|
|
@ -50,11 +50,11 @@
|
|||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
CACHE MANIFEST
|
||||
# 7f3ef819c597c3951a64
|
||||
# f688cbdde5a6e721015e
|
||||
|
||||
0714810ae3fb211173e2964249507195.png
|
||||
bundle.js
|
||||
|
|
|
|||
|
|
@ -1,69 +1,80 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/
|
||||
/******/ // identity function for calling harmony imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(0);
|
||||
var h1 = document.createElement('h1');
|
||||
|
|
@ -71,5 +82,5 @@ h1.innerHTML = 'Hello world!';
|
|||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
CACHE MANIFEST
|
||||
# 6ee6c7ddf81fcd66e06a
|
||||
# 737de2033617f9f6144d
|
||||
|
||||
0714810ae3fb211173e2964249507195.png
|
||||
bundle.js
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
|||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||
|
||||
module.exports = {
|
||||
context: __dirname,
|
||||
entry: './example.js',
|
||||
output: {
|
||||
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
||||
|
|
|
|||
|
|
@ -8,9 +8,19 @@ var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
|||
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
var execSync = require('child_process').execSync;
|
||||
var rimraf = require('rimraf');
|
||||
var webpackBin = path.resolve(__dirname, '..', 'node_modules', '.bin', 'webpack');
|
||||
var webpack = require('webpack');
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
|
||||
if (webpackMajorVersion === '2') {
|
||||
var extractOriginal = ExtractTextPlugin.extract;
|
||||
ExtractTextPlugin.extract = function (fallback, use) {
|
||||
return extractOriginal({
|
||||
fallback: fallback,
|
||||
use: use
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
var examples = fs.readdirSync(__dirname).filter(function (file) {
|
||||
return fs.statSync(path.join(__dirname, file)).isDirectory();
|
||||
|
|
@ -19,6 +29,25 @@ var examples = fs.readdirSync(__dirname).filter(function (file) {
|
|||
examples.forEach(function (exampleName) {
|
||||
var examplePath = path.join(__dirname, exampleName);
|
||||
var configFile = path.join(examplePath, 'webpack.config.js');
|
||||
|
||||
rimraf.sync(path.join(examplePath, 'dist', 'webpack-' + webpackMajorVersion));
|
||||
execSync(webpackBin + ' --context "' + examplePath + '" --config "' + configFile + '"');
|
||||
webpack(require(configFile), function (err, stats) {
|
||||
if (err) {
|
||||
console.error(err.stack || err);
|
||||
if (err.details) {
|
||||
console.error(err.details);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const info = stats.toJson();
|
||||
|
||||
if (stats.hasErrors()) {
|
||||
console.error(info.errors);
|
||||
}
|
||||
|
||||
if (stats.hasWarnings()) {
|
||||
console.warn(info.warnings);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(1);
|
||||
var h1 = document.createElement('h1');
|
||||
|
|
@ -50,11 +50,11 @@
|
|||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -9,4 +9,4 @@
|
|||
<h2>Partial</h2>
|
||||
<img src="0714810ae3fb211173e2964249507195.png">
|
||||
<script type="text/javascript" src="bundle.js"></script></body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,69 +1,80 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/
|
||||
/******/ // identity function for calling harmony imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(0);
|
||||
var h1 = document.createElement('h1');
|
||||
|
|
@ -71,5 +82,5 @@ h1.innerHTML = 'Hello world!';
|
|||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -9,4 +9,4 @@
|
|||
<h2>Partial</h2>
|
||||
<img src="0714810ae3fb211173e2964249507195.png">
|
||||
<script type="text/javascript" src="bundle.js"></script></body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<%= require('html!./partial.html') %>
|
||||
<%= require('html-loader!./partial.html') %>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
|||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||
|
||||
module.exports = {
|
||||
context: __dirname,
|
||||
entry: './example.js',
|
||||
output: {
|
||||
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(1);
|
||||
var h1 = document.createElement('h1');
|
||||
|
|
@ -50,9 +50,9 @@
|
|||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||||
|
||||
|
|
@ -66,8 +66,8 @@
|
|||
if(false) {
|
||||
// When the styles change, update the <style> tags
|
||||
if(!content.locals) {
|
||||
module.hot.accept("!!./../../node_modules/css-loader/index.js!./main.css", function() {
|
||||
var newContent = require("!!./../../node_modules/css-loader/index.js!./main.css");
|
||||
module.hot.accept("!!../../node_modules/css-loader/index.js!./main.css", function() {
|
||||
var newContent = require("!!../../node_modules/css-loader/index.js!./main.css");
|
||||
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
|
||||
update(newContent);
|
||||
});
|
||||
|
|
@ -76,9 +76,9 @@
|
|||
module.hot.dispose(function() { update(); });
|
||||
}
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
exports = module.exports = __webpack_require__(3)();
|
||||
// imports
|
||||
|
|
@ -90,313 +90,313 @@
|
|||
// exports
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 3 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/*
|
||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
Author Tobias Koppers @sokra
|
||||
*/
|
||||
// css base code, injected by the css-loader
|
||||
module.exports = function() {
|
||||
var list = [];
|
||||
|
||||
// return the list of modules as css string
|
||||
list.toString = function toString() {
|
||||
var result = [];
|
||||
for(var i = 0; i < this.length; i++) {
|
||||
var item = this[i];
|
||||
if(item[2]) {
|
||||
result.push("@media " + item[2] + "{" + item[1] + "}");
|
||||
} else {
|
||||
result.push(item[1]);
|
||||
}
|
||||
}
|
||||
return result.join("");
|
||||
};
|
||||
|
||||
// import a list of modules into the list
|
||||
list.i = function(modules, mediaQuery) {
|
||||
if(typeof modules === "string")
|
||||
modules = [[null, modules, ""]];
|
||||
var alreadyImportedModules = {};
|
||||
for(var i = 0; i < this.length; i++) {
|
||||
var id = this[i][0];
|
||||
if(typeof id === "number")
|
||||
alreadyImportedModules[id] = true;
|
||||
}
|
||||
for(i = 0; i < modules.length; i++) {
|
||||
var item = modules[i];
|
||||
// skip already imported module
|
||||
// this implementation is not 100% perfect for weird media query combinations
|
||||
// when a module is imported multiple times with different media queries.
|
||||
// I hope this will never occur (Hey this way we have smaller bundles)
|
||||
if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
|
||||
if(mediaQuery && !item[2]) {
|
||||
item[2] = mediaQuery;
|
||||
} else if(mediaQuery) {
|
||||
item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
|
||||
}
|
||||
list.push(item);
|
||||
}
|
||||
}
|
||||
};
|
||||
return list;
|
||||
};
|
||||
/*
|
||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
Author Tobias Koppers @sokra
|
||||
*/
|
||||
// css base code, injected by the css-loader
|
||||
module.exports = function() {
|
||||
var list = [];
|
||||
|
||||
// return the list of modules as css string
|
||||
list.toString = function toString() {
|
||||
var result = [];
|
||||
for(var i = 0; i < this.length; i++) {
|
||||
var item = this[i];
|
||||
if(item[2]) {
|
||||
result.push("@media " + item[2] + "{" + item[1] + "}");
|
||||
} else {
|
||||
result.push(item[1]);
|
||||
}
|
||||
}
|
||||
return result.join("");
|
||||
};
|
||||
|
||||
// import a list of modules into the list
|
||||
list.i = function(modules, mediaQuery) {
|
||||
if(typeof modules === "string")
|
||||
modules = [[null, modules, ""]];
|
||||
var alreadyImportedModules = {};
|
||||
for(var i = 0; i < this.length; i++) {
|
||||
var id = this[i][0];
|
||||
if(typeof id === "number")
|
||||
alreadyImportedModules[id] = true;
|
||||
}
|
||||
for(i = 0; i < modules.length; i++) {
|
||||
var item = modules[i];
|
||||
// skip already imported module
|
||||
// this implementation is not 100% perfect for weird media query combinations
|
||||
// when a module is imported multiple times with different media queries.
|
||||
// I hope this will never occur (Hey this way we have smaller bundles)
|
||||
if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
|
||||
if(mediaQuery && !item[2]) {
|
||||
item[2] = mediaQuery;
|
||||
} else if(mediaQuery) {
|
||||
item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
|
||||
}
|
||||
list.push(item);
|
||||
}
|
||||
}
|
||||
};
|
||||
return list;
|
||||
};
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 4 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
/*
|
||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
Author Tobias Koppers @sokra
|
||||
*/
|
||||
var stylesInDom = {},
|
||||
memoize = function(fn) {
|
||||
var memo;
|
||||
return function () {
|
||||
if (typeof memo === "undefined") memo = fn.apply(this, arguments);
|
||||
return memo;
|
||||
};
|
||||
},
|
||||
isOldIE = memoize(function() {
|
||||
return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
|
||||
}),
|
||||
getHeadElement = memoize(function () {
|
||||
return document.head || document.getElementsByTagName("head")[0];
|
||||
}),
|
||||
singletonElement = null,
|
||||
singletonCounter = 0,
|
||||
styleElementsInsertedAtTop = [];
|
||||
|
||||
module.exports = function(list, options) {
|
||||
if(false) {
|
||||
if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
|
||||
}
|
||||
|
||||
options = options || {};
|
||||
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
|
||||
// tags it will allow on a page
|
||||
if (typeof options.singleton === "undefined") options.singleton = isOldIE();
|
||||
|
||||
// By default, add <style> tags to the bottom of <head>.
|
||||
if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
|
||||
|
||||
var styles = listToStyles(list);
|
||||
addStylesToDom(styles, options);
|
||||
|
||||
return function update(newList) {
|
||||
var mayRemove = [];
|
||||
for(var i = 0; i < styles.length; i++) {
|
||||
var item = styles[i];
|
||||
var domStyle = stylesInDom[item.id];
|
||||
domStyle.refs--;
|
||||
mayRemove.push(domStyle);
|
||||
}
|
||||
if(newList) {
|
||||
var newStyles = listToStyles(newList);
|
||||
addStylesToDom(newStyles, options);
|
||||
}
|
||||
for(var i = 0; i < mayRemove.length; i++) {
|
||||
var domStyle = mayRemove[i];
|
||||
if(domStyle.refs === 0) {
|
||||
for(var j = 0; j < domStyle.parts.length; j++)
|
||||
domStyle.parts[j]();
|
||||
delete stylesInDom[domStyle.id];
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function addStylesToDom(styles, options) {
|
||||
for(var i = 0; i < styles.length; i++) {
|
||||
var item = styles[i];
|
||||
var domStyle = stylesInDom[item.id];
|
||||
if(domStyle) {
|
||||
domStyle.refs++;
|
||||
for(var j = 0; j < domStyle.parts.length; j++) {
|
||||
domStyle.parts[j](item.parts[j]);
|
||||
}
|
||||
for(; j < item.parts.length; j++) {
|
||||
domStyle.parts.push(addStyle(item.parts[j], options));
|
||||
}
|
||||
} else {
|
||||
var parts = [];
|
||||
for(var j = 0; j < item.parts.length; j++) {
|
||||
parts.push(addStyle(item.parts[j], options));
|
||||
}
|
||||
stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function listToStyles(list) {
|
||||
var styles = [];
|
||||
var newStyles = {};
|
||||
for(var i = 0; i < list.length; i++) {
|
||||
var item = list[i];
|
||||
var id = item[0];
|
||||
var css = item[1];
|
||||
var media = item[2];
|
||||
var sourceMap = item[3];
|
||||
var part = {css: css, media: media, sourceMap: sourceMap};
|
||||
if(!newStyles[id])
|
||||
styles.push(newStyles[id] = {id: id, parts: [part]});
|
||||
else
|
||||
newStyles[id].parts.push(part);
|
||||
}
|
||||
return styles;
|
||||
}
|
||||
|
||||
function insertStyleElement(options, styleElement) {
|
||||
var head = getHeadElement();
|
||||
var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
|
||||
if (options.insertAt === "top") {
|
||||
if(!lastStyleElementInsertedAtTop) {
|
||||
head.insertBefore(styleElement, head.firstChild);
|
||||
} else if(lastStyleElementInsertedAtTop.nextSibling) {
|
||||
head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
|
||||
} else {
|
||||
head.appendChild(styleElement);
|
||||
}
|
||||
styleElementsInsertedAtTop.push(styleElement);
|
||||
} else if (options.insertAt === "bottom") {
|
||||
head.appendChild(styleElement);
|
||||
} else {
|
||||
throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
|
||||
}
|
||||
}
|
||||
|
||||
function removeStyleElement(styleElement) {
|
||||
styleElement.parentNode.removeChild(styleElement);
|
||||
var idx = styleElementsInsertedAtTop.indexOf(styleElement);
|
||||
if(idx >= 0) {
|
||||
styleElementsInsertedAtTop.splice(idx, 1);
|
||||
}
|
||||
}
|
||||
|
||||
function createStyleElement(options) {
|
||||
var styleElement = document.createElement("style");
|
||||
styleElement.type = "text/css";
|
||||
insertStyleElement(options, styleElement);
|
||||
return styleElement;
|
||||
}
|
||||
|
||||
function createLinkElement(options) {
|
||||
var linkElement = document.createElement("link");
|
||||
linkElement.rel = "stylesheet";
|
||||
insertStyleElement(options, linkElement);
|
||||
return linkElement;
|
||||
}
|
||||
|
||||
function addStyle(obj, options) {
|
||||
var styleElement, update, remove;
|
||||
|
||||
if (options.singleton) {
|
||||
var styleIndex = singletonCounter++;
|
||||
styleElement = singletonElement || (singletonElement = createStyleElement(options));
|
||||
update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
|
||||
remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
|
||||
} else if(obj.sourceMap &&
|
||||
typeof URL === "function" &&
|
||||
typeof URL.createObjectURL === "function" &&
|
||||
typeof URL.revokeObjectURL === "function" &&
|
||||
typeof Blob === "function" &&
|
||||
typeof btoa === "function") {
|
||||
styleElement = createLinkElement(options);
|
||||
update = updateLink.bind(null, styleElement);
|
||||
remove = function() {
|
||||
removeStyleElement(styleElement);
|
||||
if(styleElement.href)
|
||||
URL.revokeObjectURL(styleElement.href);
|
||||
};
|
||||
} else {
|
||||
styleElement = createStyleElement(options);
|
||||
update = applyToTag.bind(null, styleElement);
|
||||
remove = function() {
|
||||
removeStyleElement(styleElement);
|
||||
};
|
||||
}
|
||||
|
||||
update(obj);
|
||||
|
||||
return function updateStyle(newObj) {
|
||||
if(newObj) {
|
||||
if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
|
||||
return;
|
||||
update(obj = newObj);
|
||||
} else {
|
||||
remove();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
var replaceText = (function () {
|
||||
var textStore = [];
|
||||
|
||||
return function (index, replacement) {
|
||||
textStore[index] = replacement;
|
||||
return textStore.filter(Boolean).join('\n');
|
||||
};
|
||||
})();
|
||||
|
||||
function applyToSingletonTag(styleElement, index, remove, obj) {
|
||||
var css = remove ? "" : obj.css;
|
||||
|
||||
if (styleElement.styleSheet) {
|
||||
styleElement.styleSheet.cssText = replaceText(index, css);
|
||||
} else {
|
||||
var cssNode = document.createTextNode(css);
|
||||
var childNodes = styleElement.childNodes;
|
||||
if (childNodes[index]) styleElement.removeChild(childNodes[index]);
|
||||
if (childNodes.length) {
|
||||
styleElement.insertBefore(cssNode, childNodes[index]);
|
||||
} else {
|
||||
styleElement.appendChild(cssNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function applyToTag(styleElement, obj) {
|
||||
var css = obj.css;
|
||||
var media = obj.media;
|
||||
|
||||
if(media) {
|
||||
styleElement.setAttribute("media", media)
|
||||
}
|
||||
|
||||
if(styleElement.styleSheet) {
|
||||
styleElement.styleSheet.cssText = css;
|
||||
} else {
|
||||
while(styleElement.firstChild) {
|
||||
styleElement.removeChild(styleElement.firstChild);
|
||||
}
|
||||
styleElement.appendChild(document.createTextNode(css));
|
||||
}
|
||||
}
|
||||
|
||||
function updateLink(linkElement, obj) {
|
||||
var css = obj.css;
|
||||
var sourceMap = obj.sourceMap;
|
||||
|
||||
if(sourceMap) {
|
||||
// http://stackoverflow.com/a/26603875
|
||||
css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
|
||||
}
|
||||
|
||||
var blob = new Blob([css], { type: "text/css" });
|
||||
|
||||
var oldSrc = linkElement.href;
|
||||
|
||||
linkElement.href = URL.createObjectURL(blob);
|
||||
|
||||
if(oldSrc)
|
||||
URL.revokeObjectURL(oldSrc);
|
||||
}
|
||||
/*
|
||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
Author Tobias Koppers @sokra
|
||||
*/
|
||||
var stylesInDom = {},
|
||||
memoize = function(fn) {
|
||||
var memo;
|
||||
return function () {
|
||||
if (typeof memo === "undefined") memo = fn.apply(this, arguments);
|
||||
return memo;
|
||||
};
|
||||
},
|
||||
isOldIE = memoize(function() {
|
||||
return /msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase());
|
||||
}),
|
||||
getHeadElement = memoize(function () {
|
||||
return document.head || document.getElementsByTagName("head")[0];
|
||||
}),
|
||||
singletonElement = null,
|
||||
singletonCounter = 0,
|
||||
styleElementsInsertedAtTop = [];
|
||||
|
||||
module.exports = function(list, options) {
|
||||
if(false) {
|
||||
if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
|
||||
}
|
||||
|
||||
options = options || {};
|
||||
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
|
||||
// tags it will allow on a page
|
||||
if (typeof options.singleton === "undefined") options.singleton = isOldIE();
|
||||
|
||||
// By default, add <style> tags to the bottom of <head>.
|
||||
if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
|
||||
|
||||
var styles = listToStyles(list);
|
||||
addStylesToDom(styles, options);
|
||||
|
||||
return function update(newList) {
|
||||
var mayRemove = [];
|
||||
for(var i = 0; i < styles.length; i++) {
|
||||
var item = styles[i];
|
||||
var domStyle = stylesInDom[item.id];
|
||||
domStyle.refs--;
|
||||
mayRemove.push(domStyle);
|
||||
}
|
||||
if(newList) {
|
||||
var newStyles = listToStyles(newList);
|
||||
addStylesToDom(newStyles, options);
|
||||
}
|
||||
for(var i = 0; i < mayRemove.length; i++) {
|
||||
var domStyle = mayRemove[i];
|
||||
if(domStyle.refs === 0) {
|
||||
for(var j = 0; j < domStyle.parts.length; j++)
|
||||
domStyle.parts[j]();
|
||||
delete stylesInDom[domStyle.id];
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function addStylesToDom(styles, options) {
|
||||
for(var i = 0; i < styles.length; i++) {
|
||||
var item = styles[i];
|
||||
var domStyle = stylesInDom[item.id];
|
||||
if(domStyle) {
|
||||
domStyle.refs++;
|
||||
for(var j = 0; j < domStyle.parts.length; j++) {
|
||||
domStyle.parts[j](item.parts[j]);
|
||||
}
|
||||
for(; j < item.parts.length; j++) {
|
||||
domStyle.parts.push(addStyle(item.parts[j], options));
|
||||
}
|
||||
} else {
|
||||
var parts = [];
|
||||
for(var j = 0; j < item.parts.length; j++) {
|
||||
parts.push(addStyle(item.parts[j], options));
|
||||
}
|
||||
stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function listToStyles(list) {
|
||||
var styles = [];
|
||||
var newStyles = {};
|
||||
for(var i = 0; i < list.length; i++) {
|
||||
var item = list[i];
|
||||
var id = item[0];
|
||||
var css = item[1];
|
||||
var media = item[2];
|
||||
var sourceMap = item[3];
|
||||
var part = {css: css, media: media, sourceMap: sourceMap};
|
||||
if(!newStyles[id])
|
||||
styles.push(newStyles[id] = {id: id, parts: [part]});
|
||||
else
|
||||
newStyles[id].parts.push(part);
|
||||
}
|
||||
return styles;
|
||||
}
|
||||
|
||||
function insertStyleElement(options, styleElement) {
|
||||
var head = getHeadElement();
|
||||
var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
|
||||
if (options.insertAt === "top") {
|
||||
if(!lastStyleElementInsertedAtTop) {
|
||||
head.insertBefore(styleElement, head.firstChild);
|
||||
} else if(lastStyleElementInsertedAtTop.nextSibling) {
|
||||
head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
|
||||
} else {
|
||||
head.appendChild(styleElement);
|
||||
}
|
||||
styleElementsInsertedAtTop.push(styleElement);
|
||||
} else if (options.insertAt === "bottom") {
|
||||
head.appendChild(styleElement);
|
||||
} else {
|
||||
throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
|
||||
}
|
||||
}
|
||||
|
||||
function removeStyleElement(styleElement) {
|
||||
styleElement.parentNode.removeChild(styleElement);
|
||||
var idx = styleElementsInsertedAtTop.indexOf(styleElement);
|
||||
if(idx >= 0) {
|
||||
styleElementsInsertedAtTop.splice(idx, 1);
|
||||
}
|
||||
}
|
||||
|
||||
function createStyleElement(options) {
|
||||
var styleElement = document.createElement("style");
|
||||
styleElement.type = "text/css";
|
||||
insertStyleElement(options, styleElement);
|
||||
return styleElement;
|
||||
}
|
||||
|
||||
function createLinkElement(options) {
|
||||
var linkElement = document.createElement("link");
|
||||
linkElement.rel = "stylesheet";
|
||||
insertStyleElement(options, linkElement);
|
||||
return linkElement;
|
||||
}
|
||||
|
||||
function addStyle(obj, options) {
|
||||
var styleElement, update, remove;
|
||||
|
||||
if (options.singleton) {
|
||||
var styleIndex = singletonCounter++;
|
||||
styleElement = singletonElement || (singletonElement = createStyleElement(options));
|
||||
update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
|
||||
remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
|
||||
} else if(obj.sourceMap &&
|
||||
typeof URL === "function" &&
|
||||
typeof URL.createObjectURL === "function" &&
|
||||
typeof URL.revokeObjectURL === "function" &&
|
||||
typeof Blob === "function" &&
|
||||
typeof btoa === "function") {
|
||||
styleElement = createLinkElement(options);
|
||||
update = updateLink.bind(null, styleElement);
|
||||
remove = function() {
|
||||
removeStyleElement(styleElement);
|
||||
if(styleElement.href)
|
||||
URL.revokeObjectURL(styleElement.href);
|
||||
};
|
||||
} else {
|
||||
styleElement = createStyleElement(options);
|
||||
update = applyToTag.bind(null, styleElement);
|
||||
remove = function() {
|
||||
removeStyleElement(styleElement);
|
||||
};
|
||||
}
|
||||
|
||||
update(obj);
|
||||
|
||||
return function updateStyle(newObj) {
|
||||
if(newObj) {
|
||||
if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
|
||||
return;
|
||||
update(obj = newObj);
|
||||
} else {
|
||||
remove();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
var replaceText = (function () {
|
||||
var textStore = [];
|
||||
|
||||
return function (index, replacement) {
|
||||
textStore[index] = replacement;
|
||||
return textStore.filter(Boolean).join('\n');
|
||||
};
|
||||
})();
|
||||
|
||||
function applyToSingletonTag(styleElement, index, remove, obj) {
|
||||
var css = remove ? "" : obj.css;
|
||||
|
||||
if (styleElement.styleSheet) {
|
||||
styleElement.styleSheet.cssText = replaceText(index, css);
|
||||
} else {
|
||||
var cssNode = document.createTextNode(css);
|
||||
var childNodes = styleElement.childNodes;
|
||||
if (childNodes[index]) styleElement.removeChild(childNodes[index]);
|
||||
if (childNodes.length) {
|
||||
styleElement.insertBefore(cssNode, childNodes[index]);
|
||||
} else {
|
||||
styleElement.appendChild(cssNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function applyToTag(styleElement, obj) {
|
||||
var css = obj.css;
|
||||
var media = obj.media;
|
||||
|
||||
if(media) {
|
||||
styleElement.setAttribute("media", media)
|
||||
}
|
||||
|
||||
if(styleElement.styleSheet) {
|
||||
styleElement.styleSheet.cssText = css;
|
||||
} else {
|
||||
while(styleElement.firstChild) {
|
||||
styleElement.removeChild(styleElement.firstChild);
|
||||
}
|
||||
styleElement.appendChild(document.createTextNode(css));
|
||||
}
|
||||
}
|
||||
|
||||
function updateLink(linkElement, obj) {
|
||||
var css = obj.css;
|
||||
var sourceMap = obj.sourceMap;
|
||||
|
||||
if(sourceMap) {
|
||||
// http://stackoverflow.com/a/26603875
|
||||
css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
|
||||
}
|
||||
|
||||
var blob = new Blob([css], { type: "text/css" });
|
||||
|
||||
var oldSrc = linkElement.href;
|
||||
|
||||
linkElement.href = URL.createObjectURL(blob);
|
||||
|
||||
if(oldSrc)
|
||||
URL.revokeObjectURL(oldSrc);
|
||||
}
|
||||
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,63 +1,74 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/
|
||||
/******/ // identity function for calling harmony imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||||
|
||||
|
|
@ -71,8 +82,8 @@ if(content.locals) module.exports = content.locals;
|
|||
if(false) {
|
||||
// When the styles change, update the <style> tags
|
||||
if(!content.locals) {
|
||||
module.hot.accept("!!./../../node_modules/css-loader/index.js!./main.css", function() {
|
||||
var newContent = require("!!./../../node_modules/css-loader/index.js!./main.css");
|
||||
module.hot.accept("!!../../node_modules/css-loader/index.js!./main.css", function() {
|
||||
var newContent = require("!!../../node_modules/css-loader/index.js!./main.css");
|
||||
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
|
||||
update(newContent);
|
||||
});
|
||||
|
|
@ -81,9 +92,9 @@ if(false) {
|
|||
module.hot.dispose(function() { update(); });
|
||||
}
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(0);
|
||||
var h1 = document.createElement('h1');
|
||||
|
|
@ -91,9 +102,9 @@ h1.innerHTML = 'Hello world!';
|
|||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
exports = module.exports = __webpack_require__(3)();
|
||||
// imports
|
||||
|
|
@ -105,313 +116,313 @@ exports.push([module.i, "body {\n background: snow;\n}", ""]);
|
|||
// exports
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 3 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/*
|
||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
Author Tobias Koppers @sokra
|
||||
*/
|
||||
// css base code, injected by the css-loader
|
||||
module.exports = function() {
|
||||
var list = [];
|
||||
|
||||
// return the list of modules as css string
|
||||
list.toString = function toString() {
|
||||
var result = [];
|
||||
for(var i = 0; i < this.length; i++) {
|
||||
var item = this[i];
|
||||
if(item[2]) {
|
||||
result.push("@media " + item[2] + "{" + item[1] + "}");
|
||||
} else {
|
||||
result.push(item[1]);
|
||||
}
|
||||
}
|
||||
return result.join("");
|
||||
};
|
||||
|
||||
// import a list of modules into the list
|
||||
list.i = function(modules, mediaQuery) {
|
||||
if(typeof modules === "string")
|
||||
modules = [[null, modules, ""]];
|
||||
var alreadyImportedModules = {};
|
||||
for(var i = 0; i < this.length; i++) {
|
||||
var id = this[i][0];
|
||||
if(typeof id === "number")
|
||||
alreadyImportedModules[id] = true;
|
||||
}
|
||||
for(i = 0; i < modules.length; i++) {
|
||||
var item = modules[i];
|
||||
// skip already imported module
|
||||
// this implementation is not 100% perfect for weird media query combinations
|
||||
// when a module is imported multiple times with different media queries.
|
||||
// I hope this will never occur (Hey this way we have smaller bundles)
|
||||
if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
|
||||
if(mediaQuery && !item[2]) {
|
||||
item[2] = mediaQuery;
|
||||
} else if(mediaQuery) {
|
||||
item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
|
||||
}
|
||||
list.push(item);
|
||||
}
|
||||
}
|
||||
};
|
||||
return list;
|
||||
};
|
||||
/*
|
||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
Author Tobias Koppers @sokra
|
||||
*/
|
||||
// css base code, injected by the css-loader
|
||||
module.exports = function() {
|
||||
var list = [];
|
||||
|
||||
// return the list of modules as css string
|
||||
list.toString = function toString() {
|
||||
var result = [];
|
||||
for(var i = 0; i < this.length; i++) {
|
||||
var item = this[i];
|
||||
if(item[2]) {
|
||||
result.push("@media " + item[2] + "{" + item[1] + "}");
|
||||
} else {
|
||||
result.push(item[1]);
|
||||
}
|
||||
}
|
||||
return result.join("");
|
||||
};
|
||||
|
||||
// import a list of modules into the list
|
||||
list.i = function(modules, mediaQuery) {
|
||||
if(typeof modules === "string")
|
||||
modules = [[null, modules, ""]];
|
||||
var alreadyImportedModules = {};
|
||||
for(var i = 0; i < this.length; i++) {
|
||||
var id = this[i][0];
|
||||
if(typeof id === "number")
|
||||
alreadyImportedModules[id] = true;
|
||||
}
|
||||
for(i = 0; i < modules.length; i++) {
|
||||
var item = modules[i];
|
||||
// skip already imported module
|
||||
// this implementation is not 100% perfect for weird media query combinations
|
||||
// when a module is imported multiple times with different media queries.
|
||||
// I hope this will never occur (Hey this way we have smaller bundles)
|
||||
if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
|
||||
if(mediaQuery && !item[2]) {
|
||||
item[2] = mediaQuery;
|
||||
} else if(mediaQuery) {
|
||||
item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
|
||||
}
|
||||
list.push(item);
|
||||
}
|
||||
}
|
||||
};
|
||||
return list;
|
||||
};
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 4 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/*
|
||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
Author Tobias Koppers @sokra
|
||||
*/
|
||||
var stylesInDom = {},
|
||||
memoize = function(fn) {
|
||||
var memo;
|
||||
return function () {
|
||||
if (typeof memo === "undefined") memo = fn.apply(this, arguments);
|
||||
return memo;
|
||||
};
|
||||
},
|
||||
isOldIE = memoize(function() {
|
||||
return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
|
||||
}),
|
||||
getHeadElement = memoize(function () {
|
||||
return document.head || document.getElementsByTagName("head")[0];
|
||||
}),
|
||||
singletonElement = null,
|
||||
singletonCounter = 0,
|
||||
styleElementsInsertedAtTop = [];
|
||||
|
||||
module.exports = function(list, options) {
|
||||
if(typeof DEBUG !== "undefined" && DEBUG) {
|
||||
if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
|
||||
}
|
||||
|
||||
options = options || {};
|
||||
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
|
||||
// tags it will allow on a page
|
||||
if (typeof options.singleton === "undefined") options.singleton = isOldIE();
|
||||
|
||||
// By default, add <style> tags to the bottom of <head>.
|
||||
if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
|
||||
|
||||
var styles = listToStyles(list);
|
||||
addStylesToDom(styles, options);
|
||||
|
||||
return function update(newList) {
|
||||
var mayRemove = [];
|
||||
for(var i = 0; i < styles.length; i++) {
|
||||
var item = styles[i];
|
||||
var domStyle = stylesInDom[item.id];
|
||||
domStyle.refs--;
|
||||
mayRemove.push(domStyle);
|
||||
}
|
||||
if(newList) {
|
||||
var newStyles = listToStyles(newList);
|
||||
addStylesToDom(newStyles, options);
|
||||
}
|
||||
for(var i = 0; i < mayRemove.length; i++) {
|
||||
var domStyle = mayRemove[i];
|
||||
if(domStyle.refs === 0) {
|
||||
for(var j = 0; j < domStyle.parts.length; j++)
|
||||
domStyle.parts[j]();
|
||||
delete stylesInDom[domStyle.id];
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function addStylesToDom(styles, options) {
|
||||
for(var i = 0; i < styles.length; i++) {
|
||||
var item = styles[i];
|
||||
var domStyle = stylesInDom[item.id];
|
||||
if(domStyle) {
|
||||
domStyle.refs++;
|
||||
for(var j = 0; j < domStyle.parts.length; j++) {
|
||||
domStyle.parts[j](item.parts[j]);
|
||||
}
|
||||
for(; j < item.parts.length; j++) {
|
||||
domStyle.parts.push(addStyle(item.parts[j], options));
|
||||
}
|
||||
} else {
|
||||
var parts = [];
|
||||
for(var j = 0; j < item.parts.length; j++) {
|
||||
parts.push(addStyle(item.parts[j], options));
|
||||
}
|
||||
stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function listToStyles(list) {
|
||||
var styles = [];
|
||||
var newStyles = {};
|
||||
for(var i = 0; i < list.length; i++) {
|
||||
var item = list[i];
|
||||
var id = item[0];
|
||||
var css = item[1];
|
||||
var media = item[2];
|
||||
var sourceMap = item[3];
|
||||
var part = {css: css, media: media, sourceMap: sourceMap};
|
||||
if(!newStyles[id])
|
||||
styles.push(newStyles[id] = {id: id, parts: [part]});
|
||||
else
|
||||
newStyles[id].parts.push(part);
|
||||
}
|
||||
return styles;
|
||||
}
|
||||
|
||||
function insertStyleElement(options, styleElement) {
|
||||
var head = getHeadElement();
|
||||
var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
|
||||
if (options.insertAt === "top") {
|
||||
if(!lastStyleElementInsertedAtTop) {
|
||||
head.insertBefore(styleElement, head.firstChild);
|
||||
} else if(lastStyleElementInsertedAtTop.nextSibling) {
|
||||
head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
|
||||
} else {
|
||||
head.appendChild(styleElement);
|
||||
}
|
||||
styleElementsInsertedAtTop.push(styleElement);
|
||||
} else if (options.insertAt === "bottom") {
|
||||
head.appendChild(styleElement);
|
||||
} else {
|
||||
throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
|
||||
}
|
||||
}
|
||||
|
||||
function removeStyleElement(styleElement) {
|
||||
styleElement.parentNode.removeChild(styleElement);
|
||||
var idx = styleElementsInsertedAtTop.indexOf(styleElement);
|
||||
if(idx >= 0) {
|
||||
styleElementsInsertedAtTop.splice(idx, 1);
|
||||
}
|
||||
}
|
||||
|
||||
function createStyleElement(options) {
|
||||
var styleElement = document.createElement("style");
|
||||
styleElement.type = "text/css";
|
||||
insertStyleElement(options, styleElement);
|
||||
return styleElement;
|
||||
}
|
||||
|
||||
function createLinkElement(options) {
|
||||
var linkElement = document.createElement("link");
|
||||
linkElement.rel = "stylesheet";
|
||||
insertStyleElement(options, linkElement);
|
||||
return linkElement;
|
||||
}
|
||||
|
||||
function addStyle(obj, options) {
|
||||
var styleElement, update, remove;
|
||||
|
||||
if (options.singleton) {
|
||||
var styleIndex = singletonCounter++;
|
||||
styleElement = singletonElement || (singletonElement = createStyleElement(options));
|
||||
update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
|
||||
remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
|
||||
} else if(obj.sourceMap &&
|
||||
typeof URL === "function" &&
|
||||
typeof URL.createObjectURL === "function" &&
|
||||
typeof URL.revokeObjectURL === "function" &&
|
||||
typeof Blob === "function" &&
|
||||
typeof btoa === "function") {
|
||||
styleElement = createLinkElement(options);
|
||||
update = updateLink.bind(null, styleElement);
|
||||
remove = function() {
|
||||
removeStyleElement(styleElement);
|
||||
if(styleElement.href)
|
||||
URL.revokeObjectURL(styleElement.href);
|
||||
};
|
||||
} else {
|
||||
styleElement = createStyleElement(options);
|
||||
update = applyToTag.bind(null, styleElement);
|
||||
remove = function() {
|
||||
removeStyleElement(styleElement);
|
||||
};
|
||||
}
|
||||
|
||||
update(obj);
|
||||
|
||||
return function updateStyle(newObj) {
|
||||
if(newObj) {
|
||||
if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
|
||||
return;
|
||||
update(obj = newObj);
|
||||
} else {
|
||||
remove();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
var replaceText = (function () {
|
||||
var textStore = [];
|
||||
|
||||
return function (index, replacement) {
|
||||
textStore[index] = replacement;
|
||||
return textStore.filter(Boolean).join('\n');
|
||||
};
|
||||
})();
|
||||
|
||||
function applyToSingletonTag(styleElement, index, remove, obj) {
|
||||
var css = remove ? "" : obj.css;
|
||||
|
||||
if (styleElement.styleSheet) {
|
||||
styleElement.styleSheet.cssText = replaceText(index, css);
|
||||
} else {
|
||||
var cssNode = document.createTextNode(css);
|
||||
var childNodes = styleElement.childNodes;
|
||||
if (childNodes[index]) styleElement.removeChild(childNodes[index]);
|
||||
if (childNodes.length) {
|
||||
styleElement.insertBefore(cssNode, childNodes[index]);
|
||||
} else {
|
||||
styleElement.appendChild(cssNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function applyToTag(styleElement, obj) {
|
||||
var css = obj.css;
|
||||
var media = obj.media;
|
||||
|
||||
if(media) {
|
||||
styleElement.setAttribute("media", media)
|
||||
}
|
||||
|
||||
if(styleElement.styleSheet) {
|
||||
styleElement.styleSheet.cssText = css;
|
||||
} else {
|
||||
while(styleElement.firstChild) {
|
||||
styleElement.removeChild(styleElement.firstChild);
|
||||
}
|
||||
styleElement.appendChild(document.createTextNode(css));
|
||||
}
|
||||
}
|
||||
|
||||
function updateLink(linkElement, obj) {
|
||||
var css = obj.css;
|
||||
var sourceMap = obj.sourceMap;
|
||||
|
||||
if(sourceMap) {
|
||||
// http://stackoverflow.com/a/26603875
|
||||
css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
|
||||
}
|
||||
|
||||
var blob = new Blob([css], { type: "text/css" });
|
||||
|
||||
var oldSrc = linkElement.href;
|
||||
|
||||
linkElement.href = URL.createObjectURL(blob);
|
||||
|
||||
if(oldSrc)
|
||||
URL.revokeObjectURL(oldSrc);
|
||||
}
|
||||
/*
|
||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
Author Tobias Koppers @sokra
|
||||
*/
|
||||
var stylesInDom = {},
|
||||
memoize = function(fn) {
|
||||
var memo;
|
||||
return function () {
|
||||
if (typeof memo === "undefined") memo = fn.apply(this, arguments);
|
||||
return memo;
|
||||
};
|
||||
},
|
||||
isOldIE = memoize(function() {
|
||||
return /msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase());
|
||||
}),
|
||||
getHeadElement = memoize(function () {
|
||||
return document.head || document.getElementsByTagName("head")[0];
|
||||
}),
|
||||
singletonElement = null,
|
||||
singletonCounter = 0,
|
||||
styleElementsInsertedAtTop = [];
|
||||
|
||||
module.exports = function(list, options) {
|
||||
if(typeof DEBUG !== "undefined" && DEBUG) {
|
||||
if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
|
||||
}
|
||||
|
||||
options = options || {};
|
||||
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
|
||||
// tags it will allow on a page
|
||||
if (typeof options.singleton === "undefined") options.singleton = isOldIE();
|
||||
|
||||
// By default, add <style> tags to the bottom of <head>.
|
||||
if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
|
||||
|
||||
var styles = listToStyles(list);
|
||||
addStylesToDom(styles, options);
|
||||
|
||||
return function update(newList) {
|
||||
var mayRemove = [];
|
||||
for(var i = 0; i < styles.length; i++) {
|
||||
var item = styles[i];
|
||||
var domStyle = stylesInDom[item.id];
|
||||
domStyle.refs--;
|
||||
mayRemove.push(domStyle);
|
||||
}
|
||||
if(newList) {
|
||||
var newStyles = listToStyles(newList);
|
||||
addStylesToDom(newStyles, options);
|
||||
}
|
||||
for(var i = 0; i < mayRemove.length; i++) {
|
||||
var domStyle = mayRemove[i];
|
||||
if(domStyle.refs === 0) {
|
||||
for(var j = 0; j < domStyle.parts.length; j++)
|
||||
domStyle.parts[j]();
|
||||
delete stylesInDom[domStyle.id];
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function addStylesToDom(styles, options) {
|
||||
for(var i = 0; i < styles.length; i++) {
|
||||
var item = styles[i];
|
||||
var domStyle = stylesInDom[item.id];
|
||||
if(domStyle) {
|
||||
domStyle.refs++;
|
||||
for(var j = 0; j < domStyle.parts.length; j++) {
|
||||
domStyle.parts[j](item.parts[j]);
|
||||
}
|
||||
for(; j < item.parts.length; j++) {
|
||||
domStyle.parts.push(addStyle(item.parts[j], options));
|
||||
}
|
||||
} else {
|
||||
var parts = [];
|
||||
for(var j = 0; j < item.parts.length; j++) {
|
||||
parts.push(addStyle(item.parts[j], options));
|
||||
}
|
||||
stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function listToStyles(list) {
|
||||
var styles = [];
|
||||
var newStyles = {};
|
||||
for(var i = 0; i < list.length; i++) {
|
||||
var item = list[i];
|
||||
var id = item[0];
|
||||
var css = item[1];
|
||||
var media = item[2];
|
||||
var sourceMap = item[3];
|
||||
var part = {css: css, media: media, sourceMap: sourceMap};
|
||||
if(!newStyles[id])
|
||||
styles.push(newStyles[id] = {id: id, parts: [part]});
|
||||
else
|
||||
newStyles[id].parts.push(part);
|
||||
}
|
||||
return styles;
|
||||
}
|
||||
|
||||
function insertStyleElement(options, styleElement) {
|
||||
var head = getHeadElement();
|
||||
var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
|
||||
if (options.insertAt === "top") {
|
||||
if(!lastStyleElementInsertedAtTop) {
|
||||
head.insertBefore(styleElement, head.firstChild);
|
||||
} else if(lastStyleElementInsertedAtTop.nextSibling) {
|
||||
head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
|
||||
} else {
|
||||
head.appendChild(styleElement);
|
||||
}
|
||||
styleElementsInsertedAtTop.push(styleElement);
|
||||
} else if (options.insertAt === "bottom") {
|
||||
head.appendChild(styleElement);
|
||||
} else {
|
||||
throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
|
||||
}
|
||||
}
|
||||
|
||||
function removeStyleElement(styleElement) {
|
||||
styleElement.parentNode.removeChild(styleElement);
|
||||
var idx = styleElementsInsertedAtTop.indexOf(styleElement);
|
||||
if(idx >= 0) {
|
||||
styleElementsInsertedAtTop.splice(idx, 1);
|
||||
}
|
||||
}
|
||||
|
||||
function createStyleElement(options) {
|
||||
var styleElement = document.createElement("style");
|
||||
styleElement.type = "text/css";
|
||||
insertStyleElement(options, styleElement);
|
||||
return styleElement;
|
||||
}
|
||||
|
||||
function createLinkElement(options) {
|
||||
var linkElement = document.createElement("link");
|
||||
linkElement.rel = "stylesheet";
|
||||
insertStyleElement(options, linkElement);
|
||||
return linkElement;
|
||||
}
|
||||
|
||||
function addStyle(obj, options) {
|
||||
var styleElement, update, remove;
|
||||
|
||||
if (options.singleton) {
|
||||
var styleIndex = singletonCounter++;
|
||||
styleElement = singletonElement || (singletonElement = createStyleElement(options));
|
||||
update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
|
||||
remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
|
||||
} else if(obj.sourceMap &&
|
||||
typeof URL === "function" &&
|
||||
typeof URL.createObjectURL === "function" &&
|
||||
typeof URL.revokeObjectURL === "function" &&
|
||||
typeof Blob === "function" &&
|
||||
typeof btoa === "function") {
|
||||
styleElement = createLinkElement(options);
|
||||
update = updateLink.bind(null, styleElement);
|
||||
remove = function() {
|
||||
removeStyleElement(styleElement);
|
||||
if(styleElement.href)
|
||||
URL.revokeObjectURL(styleElement.href);
|
||||
};
|
||||
} else {
|
||||
styleElement = createStyleElement(options);
|
||||
update = applyToTag.bind(null, styleElement);
|
||||
remove = function() {
|
||||
removeStyleElement(styleElement);
|
||||
};
|
||||
}
|
||||
|
||||
update(obj);
|
||||
|
||||
return function updateStyle(newObj) {
|
||||
if(newObj) {
|
||||
if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
|
||||
return;
|
||||
update(obj = newObj);
|
||||
} else {
|
||||
remove();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
var replaceText = (function () {
|
||||
var textStore = [];
|
||||
|
||||
return function (index, replacement) {
|
||||
textStore[index] = replacement;
|
||||
return textStore.filter(Boolean).join('\n');
|
||||
};
|
||||
})();
|
||||
|
||||
function applyToSingletonTag(styleElement, index, remove, obj) {
|
||||
var css = remove ? "" : obj.css;
|
||||
|
||||
if (styleElement.styleSheet) {
|
||||
styleElement.styleSheet.cssText = replaceText(index, css);
|
||||
} else {
|
||||
var cssNode = document.createTextNode(css);
|
||||
var childNodes = styleElement.childNodes;
|
||||
if (childNodes[index]) styleElement.removeChild(childNodes[index]);
|
||||
if (childNodes.length) {
|
||||
styleElement.insertBefore(cssNode, childNodes[index]);
|
||||
} else {
|
||||
styleElement.appendChild(cssNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function applyToTag(styleElement, obj) {
|
||||
var css = obj.css;
|
||||
var media = obj.media;
|
||||
|
||||
if(media) {
|
||||
styleElement.setAttribute("media", media)
|
||||
}
|
||||
|
||||
if(styleElement.styleSheet) {
|
||||
styleElement.styleSheet.cssText = css;
|
||||
} else {
|
||||
while(styleElement.firstChild) {
|
||||
styleElement.removeChild(styleElement.firstChild);
|
||||
}
|
||||
styleElement.appendChild(document.createTextNode(css));
|
||||
}
|
||||
}
|
||||
|
||||
function updateLink(linkElement, obj) {
|
||||
var css = obj.css;
|
||||
var sourceMap = obj.sourceMap;
|
||||
|
||||
if(sourceMap) {
|
||||
// http://stackoverflow.com/a/26603875
|
||||
css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
|
||||
}
|
||||
|
||||
var blob = new Blob([css], { type: "text/css" });
|
||||
|
||||
var oldSrc = linkElement.href;
|
||||
|
||||
linkElement.href = URL.createObjectURL(blob);
|
||||
|
||||
if(oldSrc)
|
||||
URL.revokeObjectURL(oldSrc);
|
||||
}
|
||||
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -2,6 +2,7 @@ var path = require('path');
|
|||
var HtmlWebpackPlugin = require('../..');
|
||||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||
module.exports = {
|
||||
context: __dirname,
|
||||
entry: './example.js',
|
||||
output: {
|
||||
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(1);
|
||||
var h1 = document.createElement('h1');
|
||||
|
|
@ -50,11 +50,11 @@
|
|||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,69 +1,80 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/
|
||||
/******/ // identity function for calling harmony imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(0);
|
||||
var h1 = document.createElement('h1');
|
||||
|
|
@ -71,5 +82,5 @@ h1.innerHTML = 'Hello world!';
|
|||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -3,6 +3,7 @@ var HtmlWebpackPlugin = require('../..');
|
|||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||
module.exports = {
|
||||
context: __dirname,
|
||||
entry: './example.js',
|
||||
output: {
|
||||
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(1);
|
||||
var h1 = document.createElement('h1');
|
||||
|
|
@ -50,11 +50,11 @@
|
|||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,69 +1,80 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/
|
||||
/******/ // identity function for calling harmony imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(0);
|
||||
var h1 = document.createElement('h1');
|
||||
|
|
@ -71,5 +82,5 @@ h1.innerHTML = 'Hello world!';
|
|||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -3,6 +3,7 @@ var HtmlWebpackPlugin = require('../..');
|
|||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||
module.exports = {
|
||||
context: __dirname,
|
||||
entry: './example.js',
|
||||
output: {
|
||||
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
__webpack_require__(1);
|
||||
|
|
@ -50,11 +50,11 @@
|
|||
console.log('Hello World');
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
__webpack_require__(1);
|
||||
|
|
@ -52,11 +52,11 @@
|
|||
console.log('Hello World');
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);</script></body></html>
|
||||
|
|
@ -1,76 +1,87 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/
|
||||
/******/ // identity function for calling harmony imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
__webpack_require__(0);
|
||||
|
||||
console.log('Hello World');
|
||||
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -3,76 +3,87 @@
|
|||
}</style><script type="text/javascript">/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/
|
||||
/******/ // identity function for calling harmony imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
__webpack_require__(0);
|
||||
|
||||
console.log('Hello World');
|
||||
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);</script></body></html>
|
||||
|
|
@ -4,6 +4,7 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
|||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||
|
||||
module.exports = {
|
||||
context: __dirname,
|
||||
entry: './example.js',
|
||||
output: {
|
||||
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
||||
|
|
@ -13,7 +14,7 @@ module.exports = {
|
|||
module: {
|
||||
loaders: [
|
||||
{ test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') },
|
||||
{ test: /\.jade$/, loader: 'jade' }
|
||||
{ test: /\.jade$/, loader: 'jade-loader' }
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
__webpack_require__(1);
|
||||
|
|
@ -56,18 +56,18 @@
|
|||
}, 1000);
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 2 */,
|
||||
/* 3 */,
|
||||
/* 4 */,
|
||||
/* 5 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var jade = __webpack_require__(6);
|
||||
|
||||
|
|
@ -79,9 +79,9 @@
|
|||
buf.push("<!-- this partial is used for frontend and backend--><div class=\"time\"> <b>Current time</b><p>" + (jade.escape((jade_interp = time.toISOString()) == null ? '' : jade_interp)) + "</p></div><img" + (jade.attr("src", "" + (__webpack_require__(8)) + "", true, true)) + ">");}.call(this,"time" in locals_for_with?locals_for_with.time:typeof time!=="undefined"?time:undefined));;return buf.join("");
|
||||
}
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 6 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
|
@ -331,17 +331,17 @@
|
|||
}
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 7 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/* (ignored) */
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 8 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__.p + "0714810ae3fb211173e2964249507195.png";
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,69 +1,80 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/
|
||||
/******/ // identity function for calling harmony imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 2);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var jade = __webpack_require__(4);
|
||||
|
||||
|
|
@ -75,12 +86,12 @@ var jade_interp;
|
|||
buf.push("<!-- this partial is used for frontend and backend--><div class=\"time\"> <b>Current time</b><p>" + (jade.escape((jade_interp = time.toISOString()) == null ? '' : jade_interp)) + "</p></div><img" + (jade.attr("src", "" + (__webpack_require__(3)) + "", true, true)) + ">");}.call(this,"time" in locals_for_with?locals_for_with.time:typeof time!=="undefined"?time:undefined));;return buf.join("");
|
||||
}
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
__webpack_require__(0);
|
||||
// Use the same template for the frontend code
|
||||
var template = __webpack_require__(1);
|
||||
|
|
@ -92,18 +103,18 @@ setInterval(function () {
|
|||
}, 1000);
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 3 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__.p + "0714810ae3fb211173e2964249507195.png";
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 4 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
|
||||
/**
|
||||
* Merge two attribute objects giving precedence
|
||||
|
|
@ -351,11 +362,11 @@ exports.DebugItem = function DebugItem(lineno, filename) {
|
|||
}
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 5 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/* (ignored) */
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -3,6 +3,7 @@ var HtmlWebpackPlugin = require('../..');
|
|||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||
module.exports = {
|
||||
context: __dirname,
|
||||
entry: './example.js',
|
||||
output: {
|
||||
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
||||
|
|
|
|||
|
|
@ -42,24 +42,24 @@
|
|||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
eval("__webpack_require__(1);\n\nvar universal = __webpack_require__(5);\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//# sourceURL=webpack:///./example.js?");
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
eval("// removed by extract-text-webpack-plugin\n\n//////////////////\n// WEBPACK FOOTER\n// ./main.css\n// module id = 1\n// module chunks = 0\n//# sourceURL=webpack:///./main.css?");
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 2 */,
|
||||
/* 3 */,
|
||||
/* 4 */,
|
||||
/* 5 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
eval("// This file is used for frontend and backend\n'use strict';\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 = 5\n// module chunks = 0\n//# sourceURL=webpack:///./universial.js?");
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,78 +1,89 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/
|
||||
/******/ // identity function for calling harmony imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 2);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
eval("// This file is used for frontend and backend\n'use strict';\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?");
|
||||
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?");
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
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?");
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
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?");
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -3,6 +3,7 @@ var HtmlWebpackPlugin = require('../..');
|
|||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||
module.exports = {
|
||||
context: __dirname,
|
||||
entry: './example.js',
|
||||
output: {
|
||||
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
||||
|
|
|
|||
|
|
@ -42,24 +42,24 @@
|
|||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
eval("__webpack_require__(1);\n\nvar universal = __webpack_require__(5);\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//# sourceURL=webpack:///./example.js?");
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
eval("// removed by extract-text-webpack-plugin\n\n//////////////////\n// WEBPACK FOOTER\n// ./main.css\n// module id = 1\n// module chunks = 0\n//# sourceURL=webpack:///./main.css?");
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 2 */,
|
||||
/* 3 */,
|
||||
/* 4 */,
|
||||
/* 5 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
eval("// This file is used for frontend and backend\n'use strict';\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 = 5\n// module chunks = 0\n//# sourceURL=webpack:///./universial.js?");
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
<head><link href="styles.css" rel="stylesheet"></head>Hello World from backend2016-10-29T07:02:05.646Z<h2>Partial</h2>
|
||||
<head><link href="styles.css" rel="stylesheet"></head>Hello World from backend2017-04-17T17:13:11.491Z<h2>Partial</h2>
|
||||
<img src="0714810ae3fb211173e2964249507195.png"><script type="text/javascript" src="bundle.js"></script>
|
||||
|
|
@ -1,78 +1,89 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/
|
||||
/******/ // identity function for calling harmony imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ };
|
||||
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 2);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
eval("// This file is used for frontend and backend\n'use strict';\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?");
|
||||
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?");
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
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?");
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
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?");
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
<head><link href="styles.css" rel="stylesheet"></head>Hello World from backend2016-07-02T10:27:15.263Z<h2>Partial</h2>
|
||||
<head><link href="styles.css" rel="stylesheet"></head>Hello World from backend2017-04-17T17:12:14.752Z<h2>Partial</h2>
|
||||
<img src="0714810ae3fb211173e2964249507195.png"><script type="text/javascript" src="bundle.js"></script>
|
||||
|
|
@ -3,6 +3,7 @@ var HtmlWebpackPlugin = require('../..');
|
|||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||
module.exports = {
|
||||
context: __dirname,
|
||||
entry: './example.js',
|
||||
output: {
|
||||
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
||||
|
|
|
|||
|
|
@ -17,8 +17,20 @@ var webpack = require('webpack');
|
|||
var rimraf = require('rimraf');
|
||||
var _ = require('lodash');
|
||||
var CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin');
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||
var HtmlWebpackPlugin = require('../index.js');
|
||||
|
||||
if (webpackMajorVersion === '2') {
|
||||
var extractOriginal = ExtractTextPlugin.extract;
|
||||
ExtractTextPlugin.extract = function (fallback, use) {
|
||||
return extractOriginal({
|
||||
fallback: fallback,
|
||||
use: use
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
var OUTPUT_DIR = path.join(__dirname, '../dist');
|
||||
|
||||
jasmine.getEnv().defaultTimeoutInterval = 30000;
|
||||
|
|
@ -405,7 +417,6 @@ describe('HtmlWebpackPlugin', function () {
|
|||
});
|
||||
|
||||
it('should work with the css extract plugin', function (done) {
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
testHtmlPlugin({
|
||||
entry: path.join(__dirname, 'fixtures/theme.js'),
|
||||
output: {
|
||||
|
|
@ -425,7 +436,6 @@ describe('HtmlWebpackPlugin', function () {
|
|||
});
|
||||
|
||||
it('should work with the css extract plugin on windows and protocol relative urls support (#205)', function (done) {
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
testHtmlPlugin({
|
||||
entry: path.join(__dirname, 'fixtures/theme.js'),
|
||||
output: {
|
||||
|
|
@ -446,7 +456,6 @@ describe('HtmlWebpackPlugin', function () {
|
|||
});
|
||||
|
||||
it('should allow to add cache hashes to with the css assets', function (done) {
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
testHtmlPlugin({
|
||||
entry: path.join(__dirname, 'fixtures/theme.js'),
|
||||
output: {
|
||||
|
|
@ -466,7 +475,6 @@ describe('HtmlWebpackPlugin', function () {
|
|||
});
|
||||
|
||||
it('should inject css files when using the extract text plugin', function (done) {
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
testHtmlPlugin({
|
||||
entry: path.join(__dirname, 'fixtures/theme.js'),
|
||||
output: {
|
||||
|
|
@ -486,7 +494,6 @@ describe('HtmlWebpackPlugin', function () {
|
|||
});
|
||||
|
||||
it('should allow to add cache hashes to with injected css assets', function (done) {
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
testHtmlPlugin({
|
||||
entry: path.join(__dirname, 'fixtures/theme.js'),
|
||||
output: {
|
||||
|
|
@ -506,7 +513,6 @@ describe('HtmlWebpackPlugin', function () {
|
|||
});
|
||||
|
||||
it('should output xhtml link stylesheet tag', function (done) {
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
testHtmlPlugin({
|
||||
entry: path.join(__dirname, 'fixtures/theme.js'),
|
||||
output: {
|
||||
|
|
@ -684,7 +690,6 @@ describe('HtmlWebpackPlugin', function () {
|
|||
});
|
||||
|
||||
it('should inject js css files even if the html file is incomplete', function (done) {
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
testHtmlPlugin({
|
||||
entry: path.join(__dirname, 'fixtures/theme.js'),
|
||||
output: {
|
||||
|
|
@ -1167,7 +1172,7 @@ describe('HtmlWebpackPlugin', function () {
|
|||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
inject: false,
|
||||
template: 'jade!' + path.join(__dirname, 'fixtures/template.jade')
|
||||
template: 'jade-loader!' + path.join(__dirname, 'fixtures/template.jade')
|
||||
}),
|
||||
examplePlugin
|
||||
]
|
||||
|
|
@ -1179,8 +1184,6 @@ describe('HtmlWebpackPlugin', function () {
|
|||
|
||||
it('works with commons chunk plugin', function (done) {
|
||||
testHtmlPlugin({
|
||||
debug: true,
|
||||
verbose: true,
|
||||
entry: {
|
||||
util: path.join(__dirname, 'fixtures/util.js'),
|
||||
index: path.join(__dirname, 'fixtures/index.js')
|
||||
|
|
|
|||
Loading…
Reference in New Issue