Compare commits
2 Commits
master
...
feature/no
| Author | SHA1 | Date |
|---|---|---|
|
|
2ea554518a | |
|
|
0474662b01 |
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"ignore": [
|
||||
"**/examples/**",
|
||||
"**/node_modules/**",
|
||||
],
|
||||
"test": [
|
||||
"**/spec/**"
|
||||
]
|
||||
}
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
<!-- CLICK "Preview" FOR INSTRUCTIONS IN A MORE READABLE FORMAT -->
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- We realize there is a lot of data requested here. We ask only that you do your best to provide as much information as possible so we can better help you.
|
||||
- Support questions are better asked in one of the following locations:
|
||||
- [Stack Overflow](http://stackoverflow.com/questions/tagged/html-webpack-plugin)
|
||||
- Ensure the issue isn't already reported.
|
||||
- Should be reproducible with the latest version of `html-webpack-plugin`.
|
||||
- (Ensure `npm ls html-webpack-plugin` matches )
|
||||
|
||||
*Delete the above section and the instructions in the sections below before submitting*
|
||||
|
||||
|
||||
## Description
|
||||
|
||||
If this is a feature request, explain why it should be added. Specific use-cases are best.
|
||||
|
||||
For bug reports, please provide as much *relevant* info as possible.
|
||||
|
||||
### Error Message & Stack Trace
|
||||
|
||||
```
|
||||
COPY THE ERROR MESSAGE, INCLUDING STACK TRACE HERE
|
||||
```
|
||||
|
||||
### Config
|
||||
|
||||
Copy the relevant section from `webpack.config.js`:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
entry: 'app.js',
|
||||
output: {
|
||||
path: 'dist',
|
||||
filename: 'index_bundle.js'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
...
|
||||
]
|
||||
}
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin(),
|
||||
...
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Copy your template file:
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>My App</title>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
|
||||
## Relevant Links
|
||||
|
||||
- If your project is public, link to the repo so we can investigate directly.
|
||||
- **BONUS POINTS:** Create a [minimal reproduction](http://stackoverflow.com/help/mcve) and upload it to GitHub. This will get you the fastest support.
|
||||
|
||||
|
||||
## Environment
|
||||
|
||||
Tell us which operating system you are using, as well as which versions of Node.js, npm, webpack, and html-webpack-plugin. Run the following to get it quickly:
|
||||
|
||||
```
|
||||
node -e "var os=require('os');console.log('Node.js ' + process.version + '\n' + os.platform() + ' ' + os.release())"
|
||||
npm --version
|
||||
npm ls webpack
|
||||
npm ls html-webpack-plugin
|
||||
```
|
||||
13
.travis.yml
|
|
@ -1,18 +1,15 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- "0.12"
|
||||
- "0.10"
|
||||
- "4"
|
||||
- "5"
|
||||
- "6"
|
||||
env:
|
||||
- WEBPACK_VERSION=1 EXTRACT_PLUGIN_VERSION=1
|
||||
- WEBPACK_VERSION=2 EXTRACT_PLUGIN_VERSION=2
|
||||
- WEBPACK_VERSION=3 EXTRACT_PLUGIN_VERSION=3.0.0-beta.3
|
||||
before_install:
|
||||
- stty columns 120
|
||||
- WEBPACK=webpack
|
||||
install:
|
||||
- npm install --ignore-scripts
|
||||
- npm rm webpack
|
||||
- npm rm extract-text-webpack-plugin
|
||||
- npm install webpack@$WEBPACK_VERSION extract-text-webpack-plugin@$EXTRACT_PLUGIN_VERSION --ignore-scripts || true
|
||||
- npm install $WEBPACK --ignore-scripts || true
|
||||
script:
|
||||
- npm test
|
||||
- npm test
|
||||
39
CHANGELOG.md
|
|
@ -1,45 +1,6 @@
|
|||
Change History
|
||||
==============
|
||||
|
||||
v2.30.1
|
||||
---
|
||||
* Revert part the performance optimization (#723) because of #753.
|
||||
|
||||
v2.30.0
|
||||
---
|
||||
* Add manual sort
|
||||
* Performance improvements (#723)
|
||||
|
||||
v2.29.0
|
||||
---
|
||||
* Add support for Webpack 3
|
||||
|
||||
v2.28.0
|
||||
---
|
||||
* Backport 3.x void tag for plugin authors
|
||||
|
||||
v2.27.1
|
||||
---
|
||||
* Revert 2.25.0 loader resolving
|
||||
|
||||
v2.27.0
|
||||
---
|
||||
* Fix a chunksorter webpack 2 issue (#569)
|
||||
* Fix template path resolving(#542)
|
||||
|
||||
v2.26.0
|
||||
---
|
||||
* Allow plugins to add attributes without values to the `<script>` and `<link>` tags
|
||||
|
||||
v2.25.0
|
||||
---
|
||||
* Clearer loader output
|
||||
* Add basic support for webpack 2
|
||||
|
||||
v2.24.1
|
||||
---
|
||||
* Hide event deprecated warning of 'applyPluginsAsyncWaterfall' for html-webpack-plugin-after-emit and improve the warning message.
|
||||
|
||||
v2.24.0
|
||||
---
|
||||
* Update dependencies
|
||||
|
|
|
|||
61
README.md
|
|
@ -1,6 +1,6 @@
|
|||
HTML Webpack Plugin
|
||||
===================
|
||||
[](http://badge.fury.io/js/html-webpack-plugin) [](https://david-dm.org/jantimon/html-webpack-plugin) [](https://travis-ci.org/jantimon/html-webpack-plugin) [](https://ci.appveyor.com/project/jantimon/html-webpack-plugin) [](https://github.com/Flet/semistandard) [](https://www.bithound.io/github/jantimon/html-webpack-plugin/master/dependencies/npm) []()
|
||||
[](http://badge.fury.io/js/html-webpack-plugin) [](https://david-dm.org/ampedandwired/html-webpack-plugin) [](https://travis-ci.org/ampedandwired/html-webpack-plugin) [](https://ci.appveyor.com/project/jantimon/html-webpack-plugin) [](https://github.com/Flet/semistandard) [](https://www.bithound.io/github/ampedandwired/html-webpack-plugin/master/dependencies/npm) []()
|
||||
|
||||
[](https://nodei.co/npm/html-webpack-plugin/)
|
||||
|
||||
|
|
@ -9,7 +9,7 @@ webpack bundles. This is especially useful for webpack bundles that include
|
|||
a hash in the filename which changes every compilation. You can either let the plugin generate an HTML file for you, supply
|
||||
your own template using lodash templates or use your own loader.
|
||||
|
||||
Maintainer: Jan Nicklas [@jantimon](https://twitter.com/jantimon) and Thomas Sileghem [@mastilver](https://twitter.com/mastilver)
|
||||
Maintainer: Jan Nicklas [@jantimon](https://twitter.com/jantimon)
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
|
@ -18,26 +18,13 @@ Install the plugin with npm:
|
|||
$ npm install html-webpack-plugin --save-dev
|
||||
```
|
||||
|
||||
Third party addons:
|
||||
-------------
|
||||
Migration guide from 1.x
|
||||
------------------------
|
||||
|
||||
The html-webpack-plugin provides [hooks](https://github.com/jantimon/html-webpack-plugin#events) to extend it to your needs.
|
||||
There are already some really powerful plugins which can be integrated with zero configuration:
|
||||
[Changelog](https://github.com/ampedandwired/html-webpack-plugin/blob/master/CHANGELOG.md)
|
||||
|
||||
If you used the 1.x version please take a look at the [migration guide](https://github.com/ampedandwired/html-webpack-plugin/blob/master/migration.md)
|
||||
|
||||
* [webpack-subresource-integrity](https://www.npmjs.com/package/webpack-subresource-integrity) for enhanced asset security
|
||||
* [appcache-webpack-plugin](https://github.com/lettertwo/appcache-webpack-plugin) for iOS and Android offline usage
|
||||
* [favicons-webpack-plugin](https://github.com/jantimon/favicons-webpack-plugin) which generates favicons and icons for iOS, Android and desktop browsers
|
||||
* [html-webpack-harddisk-plugin](https://github.com/jantimon/html-webpack-harddisk-plugin) can be used to always write to disk the html file, useful when webpack-dev-server / HMR are being used
|
||||
* [html-webpack-inline-source-plugin](https://github.com/DustinJackson/html-webpack-inline-source-plugin) to inline your assets in the resulting HTML file
|
||||
* [html-webpack-inline-svg-plugin](https://github.com/thegc/html-webpack-inline-svg-plugin) to inline SVGs in the resulting HTML file.
|
||||
* [html-webpack-exclude-assets-plugin](https://github.com/jamesjieye/html-webpack-exclude-assets-plugin) for excluding assets using regular expressions
|
||||
* [html-webpack-include-assets-plugin](https://github.com/jharris4/html-webpack-include-assets-plugin) for including lists of js or css file paths (such as those copied by the copy-webpack-plugin).
|
||||
* [script-ext-html-webpack-plugin](https://github.com/numical/script-ext-html-webpack-plugin) to add `async`, `defer` or `module` attributes to your`<script>` elements, or even in-line them
|
||||
* [style-ext-html-webpack-plugin](https://github.com/numical/style-ext-html-webpack-plugin) to convert your `<link>`s to external stylesheets into `<style>` elements containing internal CSS
|
||||
* [resource-hints-webpack-plugin](https://github.com/jantimon/resource-hints-webpack-plugin) to add resource hints for faster initial page loads using `<link rel='preload'>` and `<link rel='prefetch'>`
|
||||
* [preload-webpack-plugin](https://github.com/GoogleChrome/preload-webpack-plugin) for automatically wiring up asynchronous (and other types) of JavaScript chunks using `<link rel='preload'>` helping with lazy-loading
|
||||
* [link-media-html-webpack-plugin](https://github.com/yaycmyk/link-media-html-webpack-plugin) allows for injected stylesheet `<link />` tags to have their media attribute set automatically; useful for providing specific desktop/mobile/print etc. stylesheets that the browser will conditionally download
|
||||
* [inline-chunk-manifest-html-webpack-plugin](https://github.com/jouni-kantola/inline-chunk-manifest-html-webpack-plugin) for inlining webpack's chunk manifest. Default extracts manifest and inlines in `<head>`.
|
||||
|
||||
Basic Usage
|
||||
-----------
|
||||
|
|
@ -51,7 +38,7 @@ var HtmlWebpackPlugin = require('html-webpack-plugin');
|
|||
var webpackConfig = {
|
||||
entry: 'index.js',
|
||||
output: {
|
||||
path: __dirname + '/dist',
|
||||
path: 'dist',
|
||||
filename: 'index_bundle.js'
|
||||
},
|
||||
plugins: [new HtmlWebpackPlugin()]
|
||||
|
|
@ -87,16 +74,16 @@ Allowed values are as follows:
|
|||
- `title`: The title to use for the generated HTML document.
|
||||
- `filename`: The file to write the HTML to. Defaults to `index.html`.
|
||||
You can specify a subdirectory here too (eg: `assets/admin.html`).
|
||||
- `template`: Webpack require path to the template. Please see the [docs](https://github.com/jantimon/html-webpack-plugin/blob/master/docs/template-option.md) for details.
|
||||
- `template`: Webpack require path to the template. Please see the [docs](https://github.com/ampedandwired/html-webpack-plugin/blob/master/docs/template-option.md) for details.
|
||||
- `inject`: `true | 'head' | 'body' | false` Inject all assets into the given `template` or `templateContent` - When passing `true` or `'body'` all javascript resources will be placed at the bottom of the body element. `'head'` will place the scripts in the head element.
|
||||
- `favicon`: Adds the given favicon path to the output html.
|
||||
- `minify`: `{...} | false` Pass [html-minifier](https://github.com/kangax/html-minifier#options-quick-reference)'s options as object to minify the output.
|
||||
- `minify`: `{...} | false` Pass a [html-minifier](https://github.com/kangax/html-minifier#options-quick-reference) options object to minify the output.
|
||||
- `hash`: `true | false` if `true` then append a unique webpack compilation hash to all
|
||||
included scripts and CSS files. This is useful for cache busting.
|
||||
- `cache`: `true | false` if `true` (default) try to emit the file only if it was changed.
|
||||
- `showErrors`: `true | false` if `true` (default) errors details will be written into the HTML page.
|
||||
- `showErrors`: `true | false` if `true` (default) errors details will be written into the html page.
|
||||
- `chunks`: Allows you to add only some chunks (e.g. only the unit-test chunk)
|
||||
- `chunksSortMode`: Allows to control how chunks should be sorted before they are included to the html. Allowed values: 'none' | 'auto' | 'dependency' |'manual' | {function} - default: 'auto'
|
||||
- `chunksSortMode`: Allows to control how chunks should be sorted before they are included to the html. Allowed values: 'none' | 'auto' | 'dependency' | {function} - default: 'auto'
|
||||
- `excludeChunks`: Allows you to skip some chunks (e.g. don't add the unit-test chunk)
|
||||
- `xhtml`: `true | false` If `true` render the `link` tags as self-closing, XHTML compliant. Default is `false`
|
||||
|
||||
|
|
@ -105,7 +92,7 @@ Here's an example webpack config illustrating how to use these options:
|
|||
{
|
||||
entry: 'index.js',
|
||||
output: {
|
||||
path: __dirname + '/dist',
|
||||
path: 'dist',
|
||||
filename: 'index_bundle.js'
|
||||
},
|
||||
plugins: [
|
||||
|
|
@ -120,9 +107,9 @@ Here's an example webpack config illustrating how to use these options:
|
|||
FAQ
|
||||
----
|
||||
|
||||
* [Why is my HTML minified?](https://github.com/jantimon/html-webpack-plugin/blob/master/docs/template-option.md)
|
||||
* [Why is my `<% ... %>` template not working?](https://github.com/jantimon/html-webpack-plugin/blob/master/docs/template-option.md)
|
||||
* [How can I use handlebars/pug/ejs as template engine](https://github.com/jantimon/html-webpack-plugin/blob/master/docs/template-option.md)
|
||||
* [Why is my html minified?](https://github.com/ampedandwired/html-webpack-plugin/blob/master/docs/template-option.md)
|
||||
* [Why is my `<% ... %>` template not working?](https://github.com/ampedandwired/html-webpack-plugin/blob/master/docs/template-option.md)
|
||||
* [How can I use handlebars/pug/ejs as template engine](https://github.com/ampedandwired/html-webpack-plugin/blob/master/docs/template-option.md)
|
||||
|
||||
Generating Multiple HTML Files
|
||||
------------------------------
|
||||
|
|
@ -132,7 +119,7 @@ once in your plugins array:
|
|||
{
|
||||
entry: 'index.js',
|
||||
output: {
|
||||
path: __dirname + '/dist',
|
||||
path: 'dist',
|
||||
filename: 'index_bundle.js'
|
||||
},
|
||||
plugins: [
|
||||
|
|
@ -148,7 +135,7 @@ once in your plugins array:
|
|||
Writing Your Own Templates
|
||||
--------------------------
|
||||
If the default generated HTML doesn't meet your needs you can supply
|
||||
your own template. The easiest way is to use the `template` option and pass a custom HTML file.
|
||||
your own template. The easiest way is to use the `template` option and pass a custom html file.
|
||||
The html-webpack-plugin will automatically inject all necessary CSS, JS, manifest
|
||||
and favicon files into the markup.
|
||||
|
||||
|
|
@ -228,7 +215,7 @@ The following variables are available in the template:
|
|||
- `webpack`: the webpack [stats](https://github.com/webpack/docs/wiki/node.js-api#stats)
|
||||
object. Note that this is the stats object as it was at the time the HTML template
|
||||
was emitted and as such may not have the full set of stats that are available
|
||||
after the webpack run is complete.
|
||||
after the wepback run is complete.
|
||||
|
||||
- `webpackConfig`: the webpack configuration that was used for this compilation. This
|
||||
can be used, for example, to get the `publicPath` (`webpackConfig.output.publicPath`).
|
||||
|
|
@ -260,7 +247,7 @@ plugins: [
|
|||
Events
|
||||
------
|
||||
|
||||
To allow other [plugins](https://github.com/webpack/docs/wiki/plugins) to alter the HTML this plugin executes the following events:
|
||||
To allow other [plugins](https://github.com/webpack/docs/wiki/plugins) to alter the html this plugin executes the following events:
|
||||
|
||||
Async:
|
||||
|
||||
|
|
@ -308,16 +295,14 @@ plugins: [
|
|||
]
|
||||
```
|
||||
|
||||
Note that the callback must be passed the htmlPluginData in order to pass this onto any other plugins listening on the same `html-webpack-plugin-before-html-processing` event.
|
||||
Note that the callback must be passed the htmlPluginData in order to pass this onto any other plugins listening on the same 'html-webpack-plugin-before-html-processing' event.
|
||||
|
||||
|
||||
# Contribution
|
||||
|
||||
You're free to contribute to this project by submitting [issues](https://github.com/jantimon/html-webpack-plugin/issues) and/or [pull requests](https://github.com/jantimon/html-webpack-plugin/pulls). This project is test-driven, so keep in mind that every change and new feature should be covered by tests.
|
||||
You're free to contribute to this project by submitting [issues](https://github.com/ampedandwired/html-webpack-plugin/issues) and/or [pull requests](https://github.com/ampedandwired/html-webpack-plugin/pulls). This project is test-driven, so keep in mind that every change and new feature should be covered by tests.
|
||||
This project uses the [semistandard code style](https://github.com/Flet/semistandard).
|
||||
|
||||
Before running the tests, make sure to execute `yarn link` and `yarn link html-webpack-plugin` (or the npm variant of this).
|
||||
|
||||
# License
|
||||
|
||||
This project is licensed under [MIT](https://github.com/jantimon/html-webpack-plugin/blob/master/LICENSE).
|
||||
This project is licensed under [MIT](https://github.com/ampedandwired/html-webpack-plugin/blob/master/LICENSE).
|
||||
|
|
|
|||
|
|
@ -21,17 +21,6 @@ There are three ways to set the loader:
|
|||
|
||||
By default (if you don't specify any loader in any way) a [fallback ejs loader](https://github.com/ampedandwired/html-webpack-plugin/blob/master/lib/loader.js) kicks in.
|
||||
|
||||
```js
|
||||
{
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
template: 'src/index.ejs'
|
||||
})
|
||||
]
|
||||
}
|
||||
```
|
||||
It is a good idea to use `.ejs` instead of `.html` so you do not unexpectedly trigger another loader.
|
||||
|
||||
## 2) Setting a loader directly for the template
|
||||
|
||||
```js
|
||||
|
|
@ -49,7 +38,7 @@ new HtmlWebpackPlugin({
|
|||
loaders: [
|
||||
{
|
||||
test: /\.hbs$/,
|
||||
loader: 'handlebars-loader'
|
||||
loader: 'handlebars'
|
||||
},
|
||||
]
|
||||
},
|
||||
|
|
@ -61,7 +50,7 @@ new HtmlWebpackPlugin({
|
|||
}
|
||||
```
|
||||
|
||||
However this also means that in the following example webpack will use the [html loader for your template](https://webpack.js.org/loaders/html-loader/).
|
||||
However this also means that in the following example webpack will use the html loader for your template.
|
||||
This will **cause html minification** and it will also **disable the ejs fallback** loader.
|
||||
|
||||
```js
|
||||
|
|
@ -70,8 +59,8 @@ This will **cause html minification** and it will also **disable the ejs fallbac
|
|||
loaders: [
|
||||
{
|
||||
test: /\.html$/,
|
||||
loader: 'html-loader'
|
||||
}],
|
||||
loader: 'html'
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
|
|
|
|||
|
|
@ -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
|
||||
# f688cbdde5a6e721015e
|
||||
# 7f3ef819c597c3951a64
|
||||
|
||||
0714810ae3fb211173e2964249507195.png
|
||||
bundle.js
|
||||
|
|
|
|||
|
|
@ -1,80 +1,69 @@
|
|||
/******/ (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 harmony imports with the correct context
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ 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');
|
||||
|
|
@ -82,5 +71,5 @@ h1.innerHTML = 'Hello world!';
|
|||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ })
|
||||
/***/ }
|
||||
/******/ ]);
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
CACHE MANIFEST
|
||||
# 737de2033617f9f6144d
|
||||
# 6ee6c7ddf81fcd66e06a
|
||||
|
||||
0714810ae3fb211173e2964249507195.png
|
||||
bundle.js
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 53 KiB |
|
|
@ -1,83 +0,0 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ 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;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, 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 = 0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(1);
|
||||
var h1 = document.createElement('h1');
|
||||
h1.innerHTML = 'Hello world!';
|
||||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1 +0,0 @@
|
|||
<!doctype html><html lang="en" manifest="manifest.appcache"><head><meta charset="utf-8"><title>Example template</title><meta name="viewport" content="width=device-width,initial-scale=1"><link href="styles.css" rel="stylesheet"></head><body><img src="0714810ae3fb211173e2964249507195.png"><script type="text/javascript" src="bundle.js"></script></body></html>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
CACHE MANIFEST
|
||||
# eda37a6c6de5fd0ecfbe
|
||||
|
||||
0714810ae3fb211173e2964249507195.png
|
||||
bundle.js
|
||||
styles.css
|
||||
|
||||
NETWORK:
|
||||
*
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
body {
|
||||
background: snow;
|
||||
}
|
||||
|
|
@ -5,7 +5,6 @@ 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,19 +8,9 @@ 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 webpack = require('webpack');
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
|
||||
if (Number(webpackMajorVersion) > 1) {
|
||||
var extractOriginal = ExtractTextPlugin.extract;
|
||||
ExtractTextPlugin.extract = function (fallback, use) {
|
||||
return extractOriginal({
|
||||
fallback: fallback,
|
||||
use: use
|
||||
});
|
||||
};
|
||||
}
|
||||
var webpackBin = path.resolve(__dirname, '..', 'node_modules', '.bin', 'webpack');
|
||||
|
||||
var examples = fs.readdirSync(__dirname).filter(function (file) {
|
||||
return fs.statSync(path.join(__dirname, file)).isDirectory();
|
||||
|
|
@ -29,25 +19,6 @@ 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));
|
||||
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);
|
||||
}
|
||||
});
|
||||
execSync(webpackBin + ' --context "' + examplePath + '" --config "' + configFile + '"');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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,80 +1,69 @@
|
|||
/******/ (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 harmony imports with the correct context
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ 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');
|
||||
|
|
@ -82,5 +71,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>
|
||||
|
Before Width: | Height: | Size: 53 KiB |
|
|
@ -1,83 +0,0 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ 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;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, 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 = 0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(1);
|
||||
var h1 = document.createElement('h1');
|
||||
h1.innerHTML = 'Hello world!';
|
||||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Webpack App</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="styles.css" rel="stylesheet"></head>
|
||||
<body>
|
||||
<h2>Partial</h2>
|
||||
<img src="0714810ae3fb211173e2964249507195.png">
|
||||
<script type="text/javascript" src="bundle.js"></script></body>
|
||||
</html>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
body {
|
||||
background: snow;
|
||||
}
|
||||
|
|
@ -6,6 +6,6 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<%= require('html-loader!./partial.html') %>
|
||||
<%= require('html!./partial.html') %>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
@ -4,7 +4,6 @@ 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(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);
|
||||
}
|
||||
/*
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
/***/ })
|
||||
/***/ }
|
||||
/******/ ]);
|
||||
|
|
@ -1,74 +1,63 @@
|
|||
/******/ (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 harmony imports with the correct context
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ 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
|
||||
|
||||
|
|
@ -82,8 +71,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);
|
||||
});
|
||||
|
|
@ -92,9 +81,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');
|
||||
|
|
@ -102,9 +91,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
|
||||
|
|
@ -116,313 +105,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(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);
|
||||
}
|
||||
/*
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
/***/ })
|
||||
/***/ }
|
||||
/******/ ]);
|
||||
|
|
@ -1,425 +0,0 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ 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;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, 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 = 0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(1);
|
||||
var h1 = document.createElement('h1');
|
||||
h1.innerHTML = 'Hello world!';
|
||||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||||
|
||||
// load the styles
|
||||
var content = __webpack_require__(2);
|
||||
if(typeof content === 'string') content = [[module.i, content, '']];
|
||||
// add the styles to the DOM
|
||||
var update = __webpack_require__(4)(content, {});
|
||||
if(content.locals) module.exports = content.locals;
|
||||
// Hot Module Replacement
|
||||
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");
|
||||
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
|
||||
update(newContent);
|
||||
});
|
||||
}
|
||||
// When the module is disposed, remove the <style> tags
|
||||
module.hot.dispose(function() { update(); });
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
exports = module.exports = __webpack_require__(3)();
|
||||
// imports
|
||||
|
||||
|
||||
// module
|
||||
exports.push([module.i, "body {\n background: snow;\n}", ""]);
|
||||
|
||||
// exports
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 3 */
|
||||
/***/ (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;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 4 */
|
||||
/***/ (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(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);
|
||||
}
|
||||
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Webpack App</title>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript" src="bundle.js"></script></body>
|
||||
</html>
|
||||
|
|
@ -2,7 +2,6 @@ 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,80 +1,69 @@
|
|||
/******/ (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 harmony imports with the correct context
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ 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');
|
||||
|
|
@ -82,5 +71,5 @@ h1.innerHTML = 'Hello world!';
|
|||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ })
|
||||
/***/ }
|
||||
/******/ ]);
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ 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;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, 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 = 0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(1);
|
||||
var h1 = document.createElement('h1');
|
||||
h1.innerHTML = 'Hello world!';
|
||||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>HtmlWebpackPlugin example</title>
|
||||
<link rel="shortcut icon" href="favicon.ico"><link href="styles.css" rel="stylesheet"></head>
|
||||
<body>
|
||||
<script type="text/javascript" src="bundle.js"></script></body>
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 766 B |
|
|
@ -1,3 +0,0 @@
|
|||
body {
|
||||
background: snow;
|
||||
}
|
||||
|
|
@ -3,7 +3,6 @@ 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,80 +1,69 @@
|
|||
/******/ (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 harmony imports with the correct context
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ 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');
|
||||
|
|
@ -82,5 +71,5 @@ h1.innerHTML = 'Hello world!';
|
|||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ })
|
||||
/***/ }
|
||||
/******/ ]);
|
||||
|
Before Width: | Height: | Size: 53 KiB |
|
|
@ -1,11 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example template</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="shortcut icon" href="favicon.ico"><link href="styles.css" rel="stylesheet"></head>
|
||||
<body>
|
||||
<img src="0714810ae3fb211173e2964249507195.png">
|
||||
<script type="text/javascript" src="bundle.js"></script></body>
|
||||
</html>
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ 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;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, 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 = 0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(1);
|
||||
var h1 = document.createElement('h1');
|
||||
h1.innerHTML = 'Hello world!';
|
||||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
Before Width: | Height: | Size: 766 B |
|
|
@ -1,11 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example template</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="shortcut icon" href="favicon.ico"><link href="styles.css" rel="stylesheet"></head>
|
||||
<body>
|
||||
<img src="0714810ae3fb211173e2964249507195.png">
|
||||
<script type="text/javascript" src="bundle.js"></script></body>
|
||||
</html>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
body {
|
||||
background: snow;
|
||||
}
|
||||
|
|
@ -3,7 +3,6 @@ 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,87 +1,76 @@
|
|||
/******/ (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 harmony imports with the correct context
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ 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,87 +3,76 @@
|
|||
}</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 harmony imports with the correct context
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ 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>
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ 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;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, 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 = 0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
__webpack_require__(1);
|
||||
|
||||
console.log('Hello World');
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
Before Width: | Height: | Size: 766 B |
|
|
@ -1,86 +0,0 @@
|
|||
<!DOCTYPE html><html><head><meta http-equiv="Content-type" content="text/html; charset=utf-8"><title>Jade demo</title></head><body><style>body {
|
||||
background: snow;
|
||||
}</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]) {
|
||||
/******/ 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;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, 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 = 0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
__webpack_require__(1);
|
||||
|
||||
console.log('Hello World');
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ })
|
||||
/******/ ]);</script></body></html>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
body {
|
||||
background: snow;
|
||||
}
|
||||
|
|
@ -4,7 +4,6 @@ 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),
|
||||
|
|
@ -14,7 +13,7 @@ module.exports = {
|
|||
module: {
|
||||
loaders: [
|
||||
{ test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') },
|
||||
{ test: /\.jade$/, loader: 'jade-loader' }
|
||||
{ test: /\.jade$/, loader: 'jade' }
|
||||
]
|
||||
},
|
||||
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,80 +1,69 @@
|
|||
/******/ (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 harmony imports with the correct context
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ 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);
|
||||
|
||||
|
|
@ -86,12 +75,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);
|
||||
|
|
@ -103,18 +92,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
|
||||
|
|
@ -362,11 +351,11 @@ exports.DebugItem = function DebugItem(lineno, filename) {
|
|||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
/***/ },
|
||||
/* 5 */
|
||||
/***/ (function(module, exports) {
|
||||
/***/ function(module, exports) {
|
||||
|
||||
/* (ignored) */
|
||||
|
||||
/***/ })
|
||||
/***/ }
|
||||
/******/ ]);
|
||||
|
Before Width: | Height: | Size: 53 KiB |
|
|
@ -1,369 +0,0 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ 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;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, 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 = 0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
__webpack_require__(1);
|
||||
// Use the same template for the frontend code
|
||||
var template = __webpack_require__(2);
|
||||
|
||||
setInterval(function () {
|
||||
var div = document.getElementById('main');
|
||||
div.innerHTML = template({ time: new Date() });
|
||||
div.style.color = 'navy';
|
||||
}, 1000);
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var jade = __webpack_require__(3);
|
||||
|
||||
module.exports = function template(locals) {
|
||||
var buf = [];
|
||||
var jade_mixins = {};
|
||||
var jade_interp;
|
||||
;var locals_for_with = (locals || {});(function (time) {
|
||||
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__(5)) + "", true, true)) + ">");}.call(this,"time" in locals_for_with?locals_for_with.time:typeof time!=="undefined"?time:undefined));;return buf.join("");
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
/* 3 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
/**
|
||||
* Merge two attribute objects giving precedence
|
||||
* to values in object `b`. Classes are special-cased
|
||||
* allowing for arrays and merging/joining appropriately
|
||||
* resulting in a string.
|
||||
*
|
||||
* @param {Object} a
|
||||
* @param {Object} b
|
||||
* @return {Object} a
|
||||
* @api private
|
||||
*/
|
||||
|
||||
exports.merge = function merge(a, b) {
|
||||
if (arguments.length === 1) {
|
||||
var attrs = a[0];
|
||||
for (var i = 1; i < a.length; i++) {
|
||||
attrs = merge(attrs, a[i]);
|
||||
}
|
||||
return attrs;
|
||||
}
|
||||
var ac = a['class'];
|
||||
var bc = b['class'];
|
||||
|
||||
if (ac || bc) {
|
||||
ac = ac || [];
|
||||
bc = bc || [];
|
||||
if (!Array.isArray(ac)) ac = [ac];
|
||||
if (!Array.isArray(bc)) bc = [bc];
|
||||
a['class'] = ac.concat(bc).filter(nulls);
|
||||
}
|
||||
|
||||
for (var key in b) {
|
||||
if (key != 'class') {
|
||||
a[key] = b[key];
|
||||
}
|
||||
}
|
||||
|
||||
return a;
|
||||
};
|
||||
|
||||
/**
|
||||
* Filter null `val`s.
|
||||
*
|
||||
* @param {*} val
|
||||
* @return {Boolean}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function nulls(val) {
|
||||
return val != null && val !== '';
|
||||
}
|
||||
|
||||
/**
|
||||
* join array as classes.
|
||||
*
|
||||
* @param {*} val
|
||||
* @return {String}
|
||||
*/
|
||||
exports.joinClasses = joinClasses;
|
||||
function joinClasses(val) {
|
||||
return (Array.isArray(val) ? val.map(joinClasses) :
|
||||
(val && typeof val === 'object') ? Object.keys(val).filter(function (key) { return val[key]; }) :
|
||||
[val]).filter(nulls).join(' ');
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the given classes.
|
||||
*
|
||||
* @param {Array} classes
|
||||
* @param {Array.<Boolean>} escaped
|
||||
* @return {String}
|
||||
*/
|
||||
exports.cls = function cls(classes, escaped) {
|
||||
var buf = [];
|
||||
for (var i = 0; i < classes.length; i++) {
|
||||
if (escaped && escaped[i]) {
|
||||
buf.push(exports.escape(joinClasses([classes[i]])));
|
||||
} else {
|
||||
buf.push(joinClasses(classes[i]));
|
||||
}
|
||||
}
|
||||
var text = joinClasses(buf);
|
||||
if (text.length) {
|
||||
return ' class="' + text + '"';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
exports.style = function (val) {
|
||||
if (val && typeof val === 'object') {
|
||||
return Object.keys(val).map(function (style) {
|
||||
return style + ':' + val[style];
|
||||
}).join(';');
|
||||
} else {
|
||||
return val;
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Render the given attribute.
|
||||
*
|
||||
* @param {String} key
|
||||
* @param {String} val
|
||||
* @param {Boolean} escaped
|
||||
* @param {Boolean} terse
|
||||
* @return {String}
|
||||
*/
|
||||
exports.attr = function attr(key, val, escaped, terse) {
|
||||
if (key === 'style') {
|
||||
val = exports.style(val);
|
||||
}
|
||||
if ('boolean' == typeof val || null == val) {
|
||||
if (val) {
|
||||
return ' ' + (terse ? key : key + '="' + key + '"');
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
} else if (0 == key.indexOf('data') && 'string' != typeof val) {
|
||||
if (JSON.stringify(val).indexOf('&') !== -1) {
|
||||
console.warn('Since Jade 2.0.0, ampersands (`&`) in data attributes ' +
|
||||
'will be escaped to `&`');
|
||||
};
|
||||
if (val && typeof val.toISOString === 'function') {
|
||||
console.warn('Jade will eliminate the double quotes around dates in ' +
|
||||
'ISO form after 2.0.0');
|
||||
}
|
||||
return ' ' + key + "='" + JSON.stringify(val).replace(/'/g, ''') + "'";
|
||||
} else if (escaped) {
|
||||
if (val && typeof val.toISOString === 'function') {
|
||||
console.warn('Jade will stringify dates in ISO form after 2.0.0');
|
||||
}
|
||||
return ' ' + key + '="' + exports.escape(val) + '"';
|
||||
} else {
|
||||
if (val && typeof val.toISOString === 'function') {
|
||||
console.warn('Jade will stringify dates in ISO form after 2.0.0');
|
||||
}
|
||||
return ' ' + key + '="' + val + '"';
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Render the given attributes object.
|
||||
*
|
||||
* @param {Object} obj
|
||||
* @param {Object} escaped
|
||||
* @return {String}
|
||||
*/
|
||||
exports.attrs = function attrs(obj, terse){
|
||||
var buf = [];
|
||||
|
||||
var keys = Object.keys(obj);
|
||||
|
||||
if (keys.length) {
|
||||
for (var i = 0; i < keys.length; ++i) {
|
||||
var key = keys[i]
|
||||
, val = obj[key];
|
||||
|
||||
if ('class' == key) {
|
||||
if (val = joinClasses(val)) {
|
||||
buf.push(' ' + key + '="' + val + '"');
|
||||
}
|
||||
} else {
|
||||
buf.push(exports.attr(key, val, false, terse));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return buf.join('');
|
||||
};
|
||||
|
||||
/**
|
||||
* Escape the given string of `html`.
|
||||
*
|
||||
* @param {String} html
|
||||
* @return {String}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
var jade_encode_html_rules = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"'
|
||||
};
|
||||
var jade_match_html = /[&<>"]/g;
|
||||
|
||||
function jade_encode_char(c) {
|
||||
return jade_encode_html_rules[c] || c;
|
||||
}
|
||||
|
||||
exports.escape = jade_escape;
|
||||
function jade_escape(html){
|
||||
var result = String(html).replace(jade_match_html, jade_encode_char);
|
||||
if (result === '' + html) return html;
|
||||
else return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Re-throw the given `err` in context to the
|
||||
* the jade in `filename` at the given `lineno`.
|
||||
*
|
||||
* @param {Error} err
|
||||
* @param {String} filename
|
||||
* @param {String} lineno
|
||||
* @api private
|
||||
*/
|
||||
|
||||
exports.rethrow = function rethrow(err, filename, lineno, str){
|
||||
if (!(err instanceof Error)) throw err;
|
||||
if ((typeof window != 'undefined' || !filename) && !str) {
|
||||
err.message += ' on line ' + lineno;
|
||||
throw err;
|
||||
}
|
||||
try {
|
||||
str = str || __webpack_require__(4).readFileSync(filename, 'utf8')
|
||||
} catch (ex) {
|
||||
rethrow(err, null, lineno)
|
||||
}
|
||||
var context = 3
|
||||
, lines = str.split('\n')
|
||||
, start = Math.max(lineno - context, 0)
|
||||
, end = Math.min(lines.length, lineno + context);
|
||||
|
||||
// Error context
|
||||
var context = lines.slice(start, end).map(function(line, i){
|
||||
var curr = i + start + 1;
|
||||
return (curr == lineno ? ' > ' : ' ')
|
||||
+ curr
|
||||
+ '| '
|
||||
+ line;
|
||||
}).join('\n');
|
||||
|
||||
// Alter exception message
|
||||
err.path = filename;
|
||||
err.message = (filename || 'Jade') + ':' + lineno
|
||||
+ '\n' + context + '\n\n' + err.message;
|
||||
throw err;
|
||||
};
|
||||
|
||||
exports.DebugItem = function DebugItem(lineno, filename) {
|
||||
this.lineno = lineno;
|
||||
this.filename = filename;
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 4 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/* (ignored) */
|
||||
|
||||
/***/ }),
|
||||
/* 5 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__.p + "0714810ae3fb211173e2964249507195.png";
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
Before Width: | Height: | Size: 766 B |
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html><head><title>Jade demo</title><link rel="shortcut icon" href="favicon.ico"><link href="styles.css" rel="stylesheet"></head><body><div id="main"><!-- this partial is used for frontend and backend--><div class="time"> <b>Current time</b><p>1999-01-01T00:00:00.000Z</p></div><img src="0714810ae3fb211173e2964249507195.png"></div><script type="text/javascript" src="bundle.js"></script></body></html>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
body {
|
||||
background: snow;
|
||||
}
|
||||
|
|
@ -3,7 +3,6 @@ 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),
|
||||
|
|
@ -14,7 +13,7 @@ module.exports = {
|
|||
loaders: [
|
||||
{ test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') },
|
||||
{ test: /\.png$/, loader: 'file-loader' },
|
||||
{ test: /\.jade$/, loader: 'jade-loader' }
|
||||
{ test: /\.jade$/, loader: 'jade' }
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
|
|
|
|||
|
|
@ -42,24 +42,15 @@
|
|||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 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?");
|
||||
eval("__webpack_require__(!(function webpackMissingModule() { var e = new Error(\"Cannot find module \\\"./main.css\\\"\"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));\n\nvar universal = __webpack_require__(1);\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?");
|
||||
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 = 1\n// module chunks = 0\n//# sourceURL=webpack:///./universial.js?");
|
||||
|
||||
/***/ }),
|
||||
/* 2 */,
|
||||
/* 3 */,
|
||||
/* 4 */,
|
||||
/* 5 */
|
||||
/***/ (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 @@
|
|||
<html><head><title>Webpack App</title><link href="styles.css" rel="stylesheet"></head><body>Hello World from backend - <h2>Partial</h2>
|
||||
<html><head><title>/index.js: Webpack App</title></head><body>Hello World from backend - <h2>Partial</h2>
|
||||
<img src="0714810ae3fb211173e2964249507195.png"><script type="text/javascript" src="bundle.js"></script></body></html>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
body {
|
||||
background: snow;
|
||||
}
|
||||
|
|
@ -1,52 +1,50 @@
|
|||
/******/ (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 harmony imports with the correct context
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ 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 ?
|
||||
|
|
@ -55,35 +53,35 @@
|
|||
/******/ __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, __webpack_require__) {
|
||||
/***/ function(module, exports) {
|
||||
|
||||
"use strict";
|
||||
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?");
|
||||
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?");
|
||||
|
||||
/***/ }),
|
||||
/***/ },
|
||||
/* 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 @@
|
|||
<html><head><title>Webpack App</title><link href="styles.css" rel="stylesheet"></head><body>Hello World from backend - <h2>Partial</h2>
|
||||
<html><head><title>template.js: Webpack App</title><link href="styles.css" rel="stylesheet"></head><body>Hello World from backend - <h2>Partial</h2>
|
||||
<img src="0714810ae3fb211173e2964249507195.png"><script type="text/javascript" src="bundle.js"></script></body></html>
|
||||
|
Before Width: | Height: | Size: 53 KiB |
|
|
@ -1,86 +0,0 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ 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;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, 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 = 0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
eval("__webpack_require__(1);\n\nvar universal = __webpack_require__(2);\nvar h1 = document.createElement('h1');\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./example.js\n// module id = 0\n// module chunks = 0\n\n//# sourceURL=webpack:///./example.js?");
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (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__) {
|
||||
|
||||
"use strict";
|
||||
eval("// This file is used for frontend and backend\n\n\n// If compiled by the html-webpack-plugin\n// HTML_WEBPACK_PLUGIN is set to true:\nvar backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined';\n\nmodule.exports = function () {\n return 'Hello World from ' + (backend ? 'backend' : 'frontend');\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./universial.js\n// module id = 2\n// module chunks = 0\n\n//# sourceURL=webpack:///./universial.js?");
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
<html><head><title>Webpack App</title><link href="styles.css" rel="stylesheet"></head><body>Hello World from backend - <h2>Partial</h2>
|
||||
<img src="0714810ae3fb211173e2964249507195.png"><script type="text/javascript" src="bundle.js"></script></body></html>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
body {
|
||||
background: snow;
|
||||
}
|
||||
|
|
@ -5,8 +5,9 @@ var universal = require('./universial.js');
|
|||
// Export a function / promise / or a string:
|
||||
// This function has to return a string or promised string:
|
||||
module.exports = function (templateParams) {
|
||||
var filename = __filename;
|
||||
var html = '<html><head>' +
|
||||
'<title>' + templateParams.htmlWebpackPlugin.options.title + '</title>' +
|
||||
'<title>' + filename + ': ' + templateParams.htmlWebpackPlugin.options.title + '</title>' +
|
||||
'</head><body>' + universal() + ' - ' + partial + '</body></html>';
|
||||
|
||||
return html;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ 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),
|
||||
|
|
@ -12,7 +11,7 @@ module.exports = {
|
|||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{ test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') },
|
||||
{ test: /\.css$/, loader: ExtractTextPlugin.extract({loader: 'css-loader'}) },
|
||||
{ test: /\.png$/, loader: 'file-loader' },
|
||||
{ test: /\.html$/, loader: 'html-loader' }
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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 backend2017-04-17T17:13:11.491Z<h2>Partial</h2>
|
||||
<head><link href="styles.css" rel="stylesheet"></head>Hello World from backend2016-10-29T07:11:51.268Z<h2>Partial</h2>
|
||||
<img src="0714810ae3fb211173e2964249507195.png"><script type="text/javascript" src="bundle.js"></script>
|
||||
|
|
@ -1,89 +1,78 @@
|
|||
/******/ (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 harmony imports with the correct context
|
||||
|
||||
/******/ // identity function for calling harmory imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
|
||||
/******/ // define getter function for harmory exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, {
|
||||
/******/ configurable: false,
|
||||
/******/ enumerable: true,
|
||||
/******/ get: getter
|
||||
/******/ });
|
||||
/******/ }
|
||||
/******/ 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, __webpack_require__) {
|
||||
/***/ function(module, exports) {
|
||||
|
||||
"use strict";
|
||||
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?");
|
||||
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?");
|
||||
|
||||
/***/ }),
|
||||
/***/ },
|
||||
/* 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 backend2017-04-17T17:12:14.752Z<h2>Partial</h2>
|
||||
<head><link href="styles.css" rel="stylesheet"></head>Hello World from backend2016-07-02T10:27:15.263Z<h2>Partial</h2>
|
||||
<img src="0714810ae3fb211173e2964249507195.png"><script type="text/javascript" src="bundle.js"></script>
|
||||
|
Before Width: | Height: | Size: 53 KiB |
|
|
@ -1,86 +0,0 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ 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;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, 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 = 0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
eval("__webpack_require__(1);\n\nvar universal = __webpack_require__(2);\nvar h1 = document.createElement('h1');\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./example.js\n// module id = 0\n// module chunks = 0\n\n//# sourceURL=webpack:///./example.js?");
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (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__) {
|
||||
|
||||
"use strict";
|
||||
eval("// This file is used for frontend and backend\n\n\n// If compiled by the html-webpack-plugin\n// HTML_WEBPACK_PLUGIN is set to true:\nvar backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined';\n\nmodule.exports = function () {\n return 'Hello World from ' + (backend ? 'backend' : 'frontend');\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./universial.js\n// module id = 2\n// module chunks = 0\n\n//# sourceURL=webpack:///./universial.js?");
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
<head><link href="styles.css" rel="stylesheet"></head>Hello World from backend2017-06-24T21:03:19.943Z<h2>Partial</h2>
|
||||
<img src="0714810ae3fb211173e2964249507195.png"><script type="text/javascript" src="bundle.js"></script>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
body {
|
||||
background: snow;
|
||||
}
|
||||
|
|
@ -3,7 +3,6 @@ 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),
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
require('./main.css');
|
||||
var h1 = document.createElement('h1');
|
||||
h1.innerHTML = 'a!';
|
||||
document.body.appendChild(h1);
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
var h1 = document.createElement('h1');
|
||||
h1.innerHTML = 'b!';
|
||||
document.body.appendChild(h1);
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
var h1 = document.createElement('h1');
|
||||
h1.innerHTML = 'c!';
|
||||
document.body.appendChild(h1);
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
var h1 = document.createElement('h1');
|
||||
h1.innerHTML = 'd!';
|
||||
document.body.appendChild(h1);
|
||||
|
Before Width: | Height: | Size: 53 KiB |
|
|
@ -1,60 +0,0 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ exports: {},
|
||||
/******/ id: moduleId,
|
||||
/******/ loaded: false
|
||||
/******/ };
|
||||
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.loaded = true;
|
||||
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(1);
|
||||
var h1 = document.createElement('h1');
|
||||
h1.innerHTML = 'a!';
|
||||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ exports: {},
|
||||
/******/ id: moduleId,
|
||||
/******/ loaded: false
|
||||
/******/ };
|
||||
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.loaded = true;
|
||||
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var h1 = document.createElement('h1');
|
||||
h1.innerHTML = 'b!';
|
||||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ exports: {},
|
||||
/******/ id: moduleId,
|
||||
/******/ loaded: false
|
||||
/******/ };
|
||||
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.loaded = true;
|
||||
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var h1 = document.createElement('h1');
|
||||
h1.innerHTML = 'c!';
|
||||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ exports: {},
|
||||
/******/ id: moduleId,
|
||||
/******/ loaded: false
|
||||
/******/ };
|
||||
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.loaded = true;
|
||||
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var h1 = document.createElement('h1');
|
||||
h1.innerHTML = 'd!';
|
||||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ exports: {},
|
||||
/******/ id: moduleId,
|
||||
/******/ loaded: false
|
||||
/******/ };
|
||||
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.loaded = true;
|
||||
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var h1 = document.createElement('h1');
|
||||
h1.innerHTML = 'e!';
|
||||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example template</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="styles.css" rel="stylesheet"></head>
|
||||
<body>
|
||||
<img src="0714810ae3fb211173e2964249507195.png">
|
||||
<script type="text/javascript" src="a.js"></script><script type="text/javascript" src="b.js"></script><script type="text/javascript" src="c.js"></script></body>
|
||||
</html>
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example template</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="styles.css" rel="stylesheet"></head>
|
||||
<body>
|
||||
<img src="0714810ae3fb211173e2964249507195.png">
|
||||
<script type="text/javascript" src="a.js"></script><script type="text/javascript" src="b.js"></script><script type="text/javascript" src="d.js"></script></body>
|
||||
</html>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
body {
|
||||
background: snow;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 53 KiB |
|
|
@ -1,86 +0,0 @@
|
|||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ 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 harmony imports with the correct context
|
||||
/******/ __webpack_require__.i = function(value) { return value; };
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, 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) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(0);
|
||||
var h1 = document.createElement('h1');
|
||||
h1.innerHTML = 'a!';
|
||||
document.body.appendChild(h1);
|
||||
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||