Compare commits
59 Commits
feature/no
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
ac3fe4ba1c | |
|
|
aedc623c77 | |
|
|
672f34bc98 | |
|
|
0cf580c628 | |
|
|
7ca7cb7702 | |
|
|
09a96f5500 | |
|
|
cb150718a3 | |
|
|
6f15d185da | |
|
|
bd043db35d | |
|
|
2cc10df68f | |
|
|
9665c63362 | |
|
|
2751adeee9 | |
|
|
efd1f7886a | |
|
|
d77b399f34 | |
|
|
7a2aa84fdb | |
|
|
9b272cfb2b | |
|
|
7a43f1043a | |
|
|
cc6ba28688 | |
|
|
b4bd75f5fe | |
|
|
b8fd1427bc | |
|
|
5a764334c0 | |
|
|
eeb94b565f | |
|
|
810771e316 | |
|
|
dc32a23996 | |
|
|
eb6a54fd46 | |
|
|
4ac7bfa8dc | |
|
|
ef1915a4ee | |
|
|
e71b512548 | |
|
|
d45e980e7d | |
|
|
2d5c42ff18 | |
|
|
73a01bdcaf | |
|
|
9bdb6189ea | |
|
|
61ec618c53 | |
|
|
9d7aa21377 | |
|
|
cbbb4a9aec | |
|
|
41dce566c3 | |
|
|
6dd753c3ba | |
|
|
7a781a4120 | |
|
|
1b4f8efe94 | |
|
|
26c95e9c4b | |
|
|
45099373d9 | |
|
|
d07d1ebf66 | |
|
|
2f4c88355c | |
|
|
ecc0784af5 | |
|
|
d22c23066a | |
|
|
90c6b90279 | |
|
|
f3abe9f6ae | |
|
|
be5d67af5b | |
|
|
9046e46d12 | |
|
|
8fbee6a732 | |
|
|
ef41d98bd0 | |
|
|
06b49ff363 | |
|
|
6657d38873 | |
|
|
e7c44ab1b5 | |
|
|
b2db3f91e9 | |
|
|
ff249a57b4 | |
|
|
8ed2159b9d | |
|
|
03320747dc | |
|
|
bac1cd4469 |
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"ignore": [
|
||||||
|
"**/examples/**",
|
||||||
|
"**/node_modules/**",
|
||||||
|
],
|
||||||
|
"test": [
|
||||||
|
"**/spec/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
<!-- 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
|
||||||
|
```
|
||||||
11
.travis.yml
|
|
@ -1,15 +1,18 @@
|
||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- "0.12"
|
|
||||||
- "0.10"
|
|
||||||
- "4"
|
- "4"
|
||||||
- "5"
|
- "5"
|
||||||
- "6"
|
- "6"
|
||||||
env:
|
env:
|
||||||
- WEBPACK=webpack
|
- 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
|
||||||
install:
|
install:
|
||||||
- npm install --ignore-scripts
|
- npm install --ignore-scripts
|
||||||
- npm rm webpack
|
- npm rm webpack
|
||||||
- npm install $WEBPACK --ignore-scripts || true
|
- npm rm extract-text-webpack-plugin
|
||||||
|
- npm install webpack@$WEBPACK_VERSION extract-text-webpack-plugin@$EXTRACT_PLUGIN_VERSION --ignore-scripts || true
|
||||||
script:
|
script:
|
||||||
- npm test
|
- npm test
|
||||||
39
CHANGELOG.md
|
|
@ -1,6 +1,45 @@
|
||||||
Change History
|
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
|
v2.24.0
|
||||||
---
|
---
|
||||||
* Update dependencies
|
* Update dependencies
|
||||||
|
|
|
||||||
61
README.md
|
|
@ -1,6 +1,6 @@
|
||||||
HTML Webpack Plugin
|
HTML Webpack Plugin
|
||||||
===================
|
===================
|
||||||
[](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) []()
|
[](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) []()
|
||||||
|
|
||||||
[](https://nodei.co/npm/html-webpack-plugin/)
|
[](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
|
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.
|
your own template using lodash templates or use your own loader.
|
||||||
|
|
||||||
Maintainer: Jan Nicklas [@jantimon](https://twitter.com/jantimon)
|
Maintainer: Jan Nicklas [@jantimon](https://twitter.com/jantimon) and Thomas Sileghem [@mastilver](https://twitter.com/mastilver)
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
@ -18,13 +18,26 @@ Install the plugin with npm:
|
||||||
$ npm install html-webpack-plugin --save-dev
|
$ npm install html-webpack-plugin --save-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
Migration guide from 1.x
|
Third party addons:
|
||||||
------------------------
|
-------------
|
||||||
|
|
||||||
[Changelog](https://github.com/ampedandwired/html-webpack-plugin/blob/master/CHANGELOG.md)
|
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:
|
||||||
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
|
Basic Usage
|
||||||
-----------
|
-----------
|
||||||
|
|
@ -38,7 +51,7 @@ var HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
var webpackConfig = {
|
var webpackConfig = {
|
||||||
entry: 'index.js',
|
entry: 'index.js',
|
||||||
output: {
|
output: {
|
||||||
path: 'dist',
|
path: __dirname + '/dist',
|
||||||
filename: 'index_bundle.js'
|
filename: 'index_bundle.js'
|
||||||
},
|
},
|
||||||
plugins: [new HtmlWebpackPlugin()]
|
plugins: [new HtmlWebpackPlugin()]
|
||||||
|
|
@ -74,16 +87,16 @@ Allowed values are as follows:
|
||||||
- `title`: The title to use for the generated HTML document.
|
- `title`: The title to use for the generated HTML document.
|
||||||
- `filename`: The file to write the HTML to. Defaults to `index.html`.
|
- `filename`: The file to write the HTML to. Defaults to `index.html`.
|
||||||
You can specify a subdirectory here too (eg: `assets/admin.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/ampedandwired/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/jantimon/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.
|
- `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.
|
- `favicon`: Adds the given favicon path to the output html.
|
||||||
- `minify`: `{...} | false` Pass a [html-minifier](https://github.com/kangax/html-minifier#options-quick-reference) options object to minify the output.
|
- `minify`: `{...} | false` Pass [html-minifier](https://github.com/kangax/html-minifier#options-quick-reference)'s options as object to minify the output.
|
||||||
- `hash`: `true | false` if `true` then append a unique webpack compilation hash to all
|
- `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.
|
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.
|
- `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)
|
- `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' | {function} - default: 'auto'
|
- `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'
|
||||||
- `excludeChunks`: Allows you to skip some chunks (e.g. don't add the unit-test chunk)
|
- `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`
|
- `xhtml`: `true | false` If `true` render the `link` tags as self-closing, XHTML compliant. Default is `false`
|
||||||
|
|
||||||
|
|
@ -92,7 +105,7 @@ Here's an example webpack config illustrating how to use these options:
|
||||||
{
|
{
|
||||||
entry: 'index.js',
|
entry: 'index.js',
|
||||||
output: {
|
output: {
|
||||||
path: 'dist',
|
path: __dirname + '/dist',
|
||||||
filename: 'index_bundle.js'
|
filename: 'index_bundle.js'
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|
@ -107,9 +120,9 @@ Here's an example webpack config illustrating how to use these options:
|
||||||
FAQ
|
FAQ
|
||||||
----
|
----
|
||||||
|
|
||||||
* [Why is my html minified?](https://github.com/ampedandwired/html-webpack-plugin/blob/master/docs/template-option.md)
|
* [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/ampedandwired/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/ampedandwired/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)
|
||||||
|
|
||||||
Generating Multiple HTML Files
|
Generating Multiple HTML Files
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
@ -119,7 +132,7 @@ once in your plugins array:
|
||||||
{
|
{
|
||||||
entry: 'index.js',
|
entry: 'index.js',
|
||||||
output: {
|
output: {
|
||||||
path: 'dist',
|
path: __dirname + '/dist',
|
||||||
filename: 'index_bundle.js'
|
filename: 'index_bundle.js'
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|
@ -135,7 +148,7 @@ once in your plugins array:
|
||||||
Writing Your Own Templates
|
Writing Your Own Templates
|
||||||
--------------------------
|
--------------------------
|
||||||
If the default generated HTML doesn't meet your needs you can supply
|
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
|
The html-webpack-plugin will automatically inject all necessary CSS, JS, manifest
|
||||||
and favicon files into the markup.
|
and favicon files into the markup.
|
||||||
|
|
||||||
|
|
@ -215,7 +228,7 @@ The following variables are available in the template:
|
||||||
- `webpack`: the webpack [stats](https://github.com/webpack/docs/wiki/node.js-api#stats)
|
- `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
|
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
|
was emitted and as such may not have the full set of stats that are available
|
||||||
after the wepback run is complete.
|
after the webpack run is complete.
|
||||||
|
|
||||||
- `webpackConfig`: the webpack configuration that was used for this compilation. This
|
- `webpackConfig`: the webpack configuration that was used for this compilation. This
|
||||||
can be used, for example, to get the `publicPath` (`webpackConfig.output.publicPath`).
|
can be used, for example, to get the `publicPath` (`webpackConfig.output.publicPath`).
|
||||||
|
|
@ -247,7 +260,7 @@ plugins: [
|
||||||
Events
|
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:
|
Async:
|
||||||
|
|
||||||
|
|
@ -295,14 +308,16 @@ 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
|
# Contribution
|
||||||
|
|
||||||
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.
|
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.
|
||||||
This project uses the [semistandard code style](https://github.com/Flet/semistandard).
|
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
|
# License
|
||||||
|
|
||||||
This project is licensed under [MIT](https://github.com/ampedandwired/html-webpack-plugin/blob/master/LICENSE).
|
This project is licensed under [MIT](https://github.com/jantimon/html-webpack-plugin/blob/master/LICENSE).
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,17 @@ 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.
|
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
|
## 2) Setting a loader directly for the template
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
@ -38,7 +49,7 @@ new HtmlWebpackPlugin({
|
||||||
loaders: [
|
loaders: [
|
||||||
{
|
{
|
||||||
test: /\.hbs$/,
|
test: /\.hbs$/,
|
||||||
loader: 'handlebars'
|
loader: 'handlebars-loader'
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -50,7 +61,7 @@ new HtmlWebpackPlugin({
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
However this also means that in the following example webpack will use the html loader for your template.
|
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/).
|
||||||
This will **cause html minification** and it will also **disable the ejs fallback** loader.
|
This will **cause html minification** and it will also **disable the ejs fallback** loader.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
@ -59,8 +70,8 @@ This will **cause html minification** and it will also **disable the ejs fallbac
|
||||||
loaders: [
|
loaders: [
|
||||||
{
|
{
|
||||||
test: /\.html$/,
|
test: /\.html$/,
|
||||||
loader: 'html'
|
loader: 'html-loader'
|
||||||
},
|
}],
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
__webpack_require__(1);
|
__webpack_require__(1);
|
||||||
var h1 = document.createElement('h1');
|
var h1 = document.createElement('h1');
|
||||||
|
|
@ -50,11 +50,11 @@
|
||||||
document.body.appendChild(h1);
|
document.body.appendChild(h1);
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
// removed by extract-text-webpack-plugin
|
// removed by extract-text-webpack-plugin
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ]);
|
/******/ ]);
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
CACHE MANIFEST
|
CACHE MANIFEST
|
||||||
# 7f3ef819c597c3951a64
|
# f688cbdde5a6e721015e
|
||||||
|
|
||||||
0714810ae3fb211173e2964249507195.png
|
0714810ae3fb211173e2964249507195.png
|
||||||
bundle.js
|
bundle.js
|
||||||
|
|
|
||||||
|
|
@ -1,69 +1,80 @@
|
||||||
/******/ (function(modules) { // webpackBootstrap
|
/******/ (function(modules) { // webpackBootstrap
|
||||||
/******/ // The module cache
|
/******/ // The module cache
|
||||||
/******/ var installedModules = {};
|
/******/ var installedModules = {};
|
||||||
|
/******/
|
||||||
/******/ // The require function
|
/******/ // The require function
|
||||||
/******/ function __webpack_require__(moduleId) {
|
/******/ function __webpack_require__(moduleId) {
|
||||||
|
/******/
|
||||||
/******/ // Check if module is in cache
|
/******/ // Check if module is in cache
|
||||||
/******/ if(installedModules[moduleId])
|
/******/ if(installedModules[moduleId]) {
|
||||||
/******/ return installedModules[moduleId].exports;
|
/******/ return installedModules[moduleId].exports;
|
||||||
|
/******/ }
|
||||||
/******/ // Create a new module (and put it into the cache)
|
/******/ // Create a new module (and put it into the cache)
|
||||||
/******/ var module = installedModules[moduleId] = {
|
/******/ var module = installedModules[moduleId] = {
|
||||||
/******/ i: moduleId,
|
/******/ i: moduleId,
|
||||||
/******/ l: false,
|
/******/ l: false,
|
||||||
/******/ exports: {}
|
/******/ exports: {}
|
||||||
/******/ };
|
/******/ };
|
||||||
|
/******/
|
||||||
/******/ // Execute the module function
|
/******/ // Execute the module function
|
||||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||||
|
/******/
|
||||||
/******/ // Flag the module as loaded
|
/******/ // Flag the module as loaded
|
||||||
/******/ module.l = true;
|
/******/ module.l = true;
|
||||||
|
/******/
|
||||||
/******/ // Return the exports of the module
|
/******/ // Return the exports of the module
|
||||||
/******/ return module.exports;
|
/******/ return module.exports;
|
||||||
/******/ }
|
/******/ }
|
||||||
|
/******/
|
||||||
|
/******/
|
||||||
/******/ // expose the modules object (__webpack_modules__)
|
/******/ // expose the modules object (__webpack_modules__)
|
||||||
/******/ __webpack_require__.m = modules;
|
/******/ __webpack_require__.m = modules;
|
||||||
|
/******/
|
||||||
/******/ // expose the module cache
|
/******/ // expose the module cache
|
||||||
/******/ __webpack_require__.c = installedModules;
|
/******/ __webpack_require__.c = installedModules;
|
||||||
|
/******/
|
||||||
/******/ // identity function for calling harmory imports with the correct context
|
/******/ // identity function for calling harmony imports with the correct context
|
||||||
/******/ __webpack_require__.i = function(value) { return value; };
|
/******/ __webpack_require__.i = function(value) { return value; };
|
||||||
|
/******/
|
||||||
/******/ // define getter function for harmory exports
|
/******/ // define getter function for harmony exports
|
||||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||||
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||||
/******/ Object.defineProperty(exports, name, {
|
/******/ Object.defineProperty(exports, name, {
|
||||||
/******/ configurable: false,
|
/******/ configurable: false,
|
||||||
/******/ enumerable: true,
|
/******/ enumerable: true,
|
||||||
/******/ get: getter
|
/******/ 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
|
/******/ // Object.prototype.hasOwnProperty.call
|
||||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||||
|
/******/
|
||||||
/******/ // __webpack_public_path__
|
/******/ // __webpack_public_path__
|
||||||
/******/ __webpack_require__.p = "";
|
/******/ __webpack_require__.p = "";
|
||||||
|
/******/
|
||||||
/******/ // Load entry module and return exports
|
/******/ // Load entry module and return exports
|
||||||
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
||||||
/******/ })
|
/******/ })
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
// removed by extract-text-webpack-plugin
|
// removed by extract-text-webpack-plugin
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
__webpack_require__(0);
|
__webpack_require__(0);
|
||||||
var h1 = document.createElement('h1');
|
var h1 = document.createElement('h1');
|
||||||
|
|
@ -71,5 +82,5 @@ h1.innerHTML = 'Hello world!';
|
||||||
document.body.appendChild(h1);
|
document.body.appendChild(h1);
|
||||||
|
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ]);
|
/******/ ]);
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
CACHE MANIFEST
|
CACHE MANIFEST
|
||||||
# 6ee6c7ddf81fcd66e06a
|
# 737de2033617f9f6144d
|
||||||
|
|
||||||
0714810ae3fb211173e2964249507195.png
|
0714810ae3fb211173e2964249507195.png
|
||||||
bundle.js
|
bundle.js
|
||||||
|
|
|
||||||
|
After Width: | Height: | Size: 53 KiB |
|
|
@ -0,0 +1,83 @@
|
||||||
|
/******/ (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
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
/******/ ]);
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
<!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>
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
CACHE MANIFEST
|
||||||
|
# eda37a6c6de5fd0ecfbe
|
||||||
|
|
||||||
|
0714810ae3fb211173e2964249507195.png
|
||||||
|
bundle.js
|
||||||
|
styles.css
|
||||||
|
|
||||||
|
NETWORK:
|
||||||
|
*
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
body {
|
||||||
|
background: snow;
|
||||||
|
}
|
||||||
|
|
@ -5,6 +5,7 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
context: __dirname,
|
||||||
entry: './example.js',
|
entry: './example.js',
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,19 @@ var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||||
|
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var execSync = require('child_process').execSync;
|
|
||||||
var rimraf = require('rimraf');
|
var rimraf = require('rimraf');
|
||||||
var webpackBin = path.resolve(__dirname, '..', 'node_modules', '.bin', 'webpack');
|
var webpack = require('webpack');
|
||||||
|
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||||
|
|
||||||
|
if (Number(webpackMajorVersion) > 1) {
|
||||||
|
var extractOriginal = ExtractTextPlugin.extract;
|
||||||
|
ExtractTextPlugin.extract = function (fallback, use) {
|
||||||
|
return extractOriginal({
|
||||||
|
fallback: fallback,
|
||||||
|
use: use
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
var examples = fs.readdirSync(__dirname).filter(function (file) {
|
var examples = fs.readdirSync(__dirname).filter(function (file) {
|
||||||
return fs.statSync(path.join(__dirname, file)).isDirectory();
|
return fs.statSync(path.join(__dirname, file)).isDirectory();
|
||||||
|
|
@ -19,6 +29,25 @@ var examples = fs.readdirSync(__dirname).filter(function (file) {
|
||||||
examples.forEach(function (exampleName) {
|
examples.forEach(function (exampleName) {
|
||||||
var examplePath = path.join(__dirname, exampleName);
|
var examplePath = path.join(__dirname, exampleName);
|
||||||
var configFile = path.join(examplePath, 'webpack.config.js');
|
var configFile = path.join(examplePath, 'webpack.config.js');
|
||||||
|
|
||||||
rimraf.sync(path.join(examplePath, 'dist', 'webpack-' + webpackMajorVersion));
|
rimraf.sync(path.join(examplePath, 'dist', 'webpack-' + webpackMajorVersion));
|
||||||
execSync(webpackBin + ' --context "' + examplePath + '" --config "' + configFile + '"');
|
webpack(require(configFile), function (err, stats) {
|
||||||
|
if (err) {
|
||||||
|
console.error(err.stack || err);
|
||||||
|
if (err.details) {
|
||||||
|
console.error(err.details);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const info = stats.toJson();
|
||||||
|
|
||||||
|
if (stats.hasErrors()) {
|
||||||
|
console.error(info.errors);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stats.hasWarnings()) {
|
||||||
|
console.warn(info.warnings);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
__webpack_require__(1);
|
__webpack_require__(1);
|
||||||
var h1 = document.createElement('h1');
|
var h1 = document.createElement('h1');
|
||||||
|
|
@ -50,11 +50,11 @@
|
||||||
document.body.appendChild(h1);
|
document.body.appendChild(h1);
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
// removed by extract-text-webpack-plugin
|
// removed by extract-text-webpack-plugin
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ]);
|
/******/ ]);
|
||||||
|
|
@ -1,69 +1,80 @@
|
||||||
/******/ (function(modules) { // webpackBootstrap
|
/******/ (function(modules) { // webpackBootstrap
|
||||||
/******/ // The module cache
|
/******/ // The module cache
|
||||||
/******/ var installedModules = {};
|
/******/ var installedModules = {};
|
||||||
|
/******/
|
||||||
/******/ // The require function
|
/******/ // The require function
|
||||||
/******/ function __webpack_require__(moduleId) {
|
/******/ function __webpack_require__(moduleId) {
|
||||||
|
/******/
|
||||||
/******/ // Check if module is in cache
|
/******/ // Check if module is in cache
|
||||||
/******/ if(installedModules[moduleId])
|
/******/ if(installedModules[moduleId]) {
|
||||||
/******/ return installedModules[moduleId].exports;
|
/******/ return installedModules[moduleId].exports;
|
||||||
|
/******/ }
|
||||||
/******/ // Create a new module (and put it into the cache)
|
/******/ // Create a new module (and put it into the cache)
|
||||||
/******/ var module = installedModules[moduleId] = {
|
/******/ var module = installedModules[moduleId] = {
|
||||||
/******/ i: moduleId,
|
/******/ i: moduleId,
|
||||||
/******/ l: false,
|
/******/ l: false,
|
||||||
/******/ exports: {}
|
/******/ exports: {}
|
||||||
/******/ };
|
/******/ };
|
||||||
|
/******/
|
||||||
/******/ // Execute the module function
|
/******/ // Execute the module function
|
||||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||||
|
/******/
|
||||||
/******/ // Flag the module as loaded
|
/******/ // Flag the module as loaded
|
||||||
/******/ module.l = true;
|
/******/ module.l = true;
|
||||||
|
/******/
|
||||||
/******/ // Return the exports of the module
|
/******/ // Return the exports of the module
|
||||||
/******/ return module.exports;
|
/******/ return module.exports;
|
||||||
/******/ }
|
/******/ }
|
||||||
|
/******/
|
||||||
|
/******/
|
||||||
/******/ // expose the modules object (__webpack_modules__)
|
/******/ // expose the modules object (__webpack_modules__)
|
||||||
/******/ __webpack_require__.m = modules;
|
/******/ __webpack_require__.m = modules;
|
||||||
|
/******/
|
||||||
/******/ // expose the module cache
|
/******/ // expose the module cache
|
||||||
/******/ __webpack_require__.c = installedModules;
|
/******/ __webpack_require__.c = installedModules;
|
||||||
|
/******/
|
||||||
/******/ // identity function for calling harmory imports with the correct context
|
/******/ // identity function for calling harmony imports with the correct context
|
||||||
/******/ __webpack_require__.i = function(value) { return value; };
|
/******/ __webpack_require__.i = function(value) { return value; };
|
||||||
|
/******/
|
||||||
/******/ // define getter function for harmory exports
|
/******/ // define getter function for harmony exports
|
||||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||||
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||||
/******/ Object.defineProperty(exports, name, {
|
/******/ Object.defineProperty(exports, name, {
|
||||||
/******/ configurable: false,
|
/******/ configurable: false,
|
||||||
/******/ enumerable: true,
|
/******/ enumerable: true,
|
||||||
/******/ get: getter
|
/******/ 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
|
/******/ // Object.prototype.hasOwnProperty.call
|
||||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||||
|
/******/
|
||||||
/******/ // __webpack_public_path__
|
/******/ // __webpack_public_path__
|
||||||
/******/ __webpack_require__.p = "";
|
/******/ __webpack_require__.p = "";
|
||||||
|
/******/
|
||||||
/******/ // Load entry module and return exports
|
/******/ // Load entry module and return exports
|
||||||
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
||||||
/******/ })
|
/******/ })
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
// removed by extract-text-webpack-plugin
|
// removed by extract-text-webpack-plugin
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
__webpack_require__(0);
|
__webpack_require__(0);
|
||||||
var h1 = document.createElement('h1');
|
var h1 = document.createElement('h1');
|
||||||
|
|
@ -71,5 +82,5 @@ h1.innerHTML = 'Hello world!';
|
||||||
document.body.appendChild(h1);
|
document.body.appendChild(h1);
|
||||||
|
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ]);
|
/******/ ]);
|
||||||
BIN
examples/custom-template/dist/webpack-3/0714810ae3fb211173e2964249507195.png
vendored
Normal file
|
After Width: | Height: | Size: 53 KiB |
|
|
@ -0,0 +1,83 @@
|
||||||
|
/******/ (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
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
/******/ ]);
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
<!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>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
body {
|
||||||
|
background: snow;
|
||||||
|
}
|
||||||
|
|
@ -6,6 +6,6 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<%= require('html!./partial.html') %>
|
<%= require('html-loader!./partial.html') %>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -4,6 +4,7 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
context: __dirname,
|
||||||
entry: './example.js',
|
entry: './example.js',
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
__webpack_require__(1);
|
__webpack_require__(1);
|
||||||
var h1 = document.createElement('h1');
|
var h1 = document.createElement('h1');
|
||||||
|
|
@ -50,9 +50,9 @@
|
||||||
document.body.appendChild(h1);
|
document.body.appendChild(h1);
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||||||
|
|
||||||
|
|
@ -66,8 +66,8 @@
|
||||||
if(false) {
|
if(false) {
|
||||||
// When the styles change, update the <style> tags
|
// When the styles change, update the <style> tags
|
||||||
if(!content.locals) {
|
if(!content.locals) {
|
||||||
module.hot.accept("!!./../../node_modules/css-loader/index.js!./main.css", function() {
|
module.hot.accept("!!../../node_modules/css-loader/index.js!./main.css", function() {
|
||||||
var newContent = require("!!./../../node_modules/css-loader/index.js!./main.css");
|
var newContent = require("!!../../node_modules/css-loader/index.js!./main.css");
|
||||||
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
|
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
|
||||||
update(newContent);
|
update(newContent);
|
||||||
});
|
});
|
||||||
|
|
@ -76,9 +76,9 @@
|
||||||
module.hot.dispose(function() { update(); });
|
module.hot.dispose(function() { update(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 2 */
|
/* 2 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
exports = module.exports = __webpack_require__(3)();
|
exports = module.exports = __webpack_require__(3)();
|
||||||
// imports
|
// imports
|
||||||
|
|
@ -90,9 +90,9 @@
|
||||||
// exports
|
// exports
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 3 */
|
/* 3 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
@ -146,9 +146,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 4 */
|
/* 4 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
@ -163,7 +163,7 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
isOldIE = memoize(function() {
|
isOldIE = memoize(function() {
|
||||||
return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
|
return /msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase());
|
||||||
}),
|
}),
|
||||||
getHeadElement = memoize(function () {
|
getHeadElement = memoize(function () {
|
||||||
return document.head || document.getElementsByTagName("head")[0];
|
return document.head || document.getElementsByTagName("head")[0];
|
||||||
|
|
@ -398,5 +398,5 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ]);
|
/******/ ]);
|
||||||
|
|
@ -1,63 +1,74 @@
|
||||||
/******/ (function(modules) { // webpackBootstrap
|
/******/ (function(modules) { // webpackBootstrap
|
||||||
/******/ // The module cache
|
/******/ // The module cache
|
||||||
/******/ var installedModules = {};
|
/******/ var installedModules = {};
|
||||||
|
/******/
|
||||||
/******/ // The require function
|
/******/ // The require function
|
||||||
/******/ function __webpack_require__(moduleId) {
|
/******/ function __webpack_require__(moduleId) {
|
||||||
|
/******/
|
||||||
/******/ // Check if module is in cache
|
/******/ // Check if module is in cache
|
||||||
/******/ if(installedModules[moduleId])
|
/******/ if(installedModules[moduleId]) {
|
||||||
/******/ return installedModules[moduleId].exports;
|
/******/ return installedModules[moduleId].exports;
|
||||||
|
/******/ }
|
||||||
/******/ // Create a new module (and put it into the cache)
|
/******/ // Create a new module (and put it into the cache)
|
||||||
/******/ var module = installedModules[moduleId] = {
|
/******/ var module = installedModules[moduleId] = {
|
||||||
/******/ i: moduleId,
|
/******/ i: moduleId,
|
||||||
/******/ l: false,
|
/******/ l: false,
|
||||||
/******/ exports: {}
|
/******/ exports: {}
|
||||||
/******/ };
|
/******/ };
|
||||||
|
/******/
|
||||||
/******/ // Execute the module function
|
/******/ // Execute the module function
|
||||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||||
|
/******/
|
||||||
/******/ // Flag the module as loaded
|
/******/ // Flag the module as loaded
|
||||||
/******/ module.l = true;
|
/******/ module.l = true;
|
||||||
|
/******/
|
||||||
/******/ // Return the exports of the module
|
/******/ // Return the exports of the module
|
||||||
/******/ return module.exports;
|
/******/ return module.exports;
|
||||||
/******/ }
|
/******/ }
|
||||||
|
/******/
|
||||||
|
/******/
|
||||||
/******/ // expose the modules object (__webpack_modules__)
|
/******/ // expose the modules object (__webpack_modules__)
|
||||||
/******/ __webpack_require__.m = modules;
|
/******/ __webpack_require__.m = modules;
|
||||||
|
/******/
|
||||||
/******/ // expose the module cache
|
/******/ // expose the module cache
|
||||||
/******/ __webpack_require__.c = installedModules;
|
/******/ __webpack_require__.c = installedModules;
|
||||||
|
/******/
|
||||||
/******/ // identity function for calling harmory imports with the correct context
|
/******/ // identity function for calling harmony imports with the correct context
|
||||||
/******/ __webpack_require__.i = function(value) { return value; };
|
/******/ __webpack_require__.i = function(value) { return value; };
|
||||||
|
/******/
|
||||||
/******/ // define getter function for harmory exports
|
/******/ // define getter function for harmony exports
|
||||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||||
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||||
/******/ Object.defineProperty(exports, name, {
|
/******/ Object.defineProperty(exports, name, {
|
||||||
/******/ configurable: false,
|
/******/ configurable: false,
|
||||||
/******/ enumerable: true,
|
/******/ enumerable: true,
|
||||||
/******/ get: getter
|
/******/ 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
|
/******/ // Object.prototype.hasOwnProperty.call
|
||||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||||
|
/******/
|
||||||
/******/ // __webpack_public_path__
|
/******/ // __webpack_public_path__
|
||||||
/******/ __webpack_require__.p = "";
|
/******/ __webpack_require__.p = "";
|
||||||
|
/******/
|
||||||
/******/ // Load entry module and return exports
|
/******/ // Load entry module and return exports
|
||||||
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
||||||
/******/ })
|
/******/ })
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||||||
|
|
||||||
|
|
@ -71,8 +82,8 @@ if(content.locals) module.exports = content.locals;
|
||||||
if(false) {
|
if(false) {
|
||||||
// When the styles change, update the <style> tags
|
// When the styles change, update the <style> tags
|
||||||
if(!content.locals) {
|
if(!content.locals) {
|
||||||
module.hot.accept("!!./../../node_modules/css-loader/index.js!./main.css", function() {
|
module.hot.accept("!!../../node_modules/css-loader/index.js!./main.css", function() {
|
||||||
var newContent = require("!!./../../node_modules/css-loader/index.js!./main.css");
|
var newContent = require("!!../../node_modules/css-loader/index.js!./main.css");
|
||||||
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
|
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
|
||||||
update(newContent);
|
update(newContent);
|
||||||
});
|
});
|
||||||
|
|
@ -81,9 +92,9 @@ if(false) {
|
||||||
module.hot.dispose(function() { update(); });
|
module.hot.dispose(function() { update(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
__webpack_require__(0);
|
__webpack_require__(0);
|
||||||
var h1 = document.createElement('h1');
|
var h1 = document.createElement('h1');
|
||||||
|
|
@ -91,9 +102,9 @@ h1.innerHTML = 'Hello world!';
|
||||||
document.body.appendChild(h1);
|
document.body.appendChild(h1);
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 2 */
|
/* 2 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
exports = module.exports = __webpack_require__(3)();
|
exports = module.exports = __webpack_require__(3)();
|
||||||
// imports
|
// imports
|
||||||
|
|
@ -105,9 +116,9 @@ exports.push([module.i, "body {\n background: snow;\n}", ""]);
|
||||||
// exports
|
// exports
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 3 */
|
/* 3 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
@ -161,9 +172,9 @@ module.exports = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 4 */
|
/* 4 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
@ -178,7 +189,7 @@ var stylesInDom = {},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
isOldIE = memoize(function() {
|
isOldIE = memoize(function() {
|
||||||
return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
|
return /msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase());
|
||||||
}),
|
}),
|
||||||
getHeadElement = memoize(function () {
|
getHeadElement = memoize(function () {
|
||||||
return document.head || document.getElementsByTagName("head")[0];
|
return document.head || document.getElementsByTagName("head")[0];
|
||||||
|
|
@ -413,5 +424,5 @@ function updateLink(linkElement, obj) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ]);
|
/******/ ]);
|
||||||
|
|
@ -0,0 +1,425 @@
|
||||||
|
/******/ (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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
/******/ ]);
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
<!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,6 +2,7 @@ var path = require('path');
|
||||||
var HtmlWebpackPlugin = require('../..');
|
var HtmlWebpackPlugin = require('../..');
|
||||||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
context: __dirname,
|
||||||
entry: './example.js',
|
entry: './example.js',
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
__webpack_require__(1);
|
__webpack_require__(1);
|
||||||
var h1 = document.createElement('h1');
|
var h1 = document.createElement('h1');
|
||||||
|
|
@ -50,11 +50,11 @@
|
||||||
document.body.appendChild(h1);
|
document.body.appendChild(h1);
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
// removed by extract-text-webpack-plugin
|
// removed by extract-text-webpack-plugin
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ]);
|
/******/ ]);
|
||||||
|
|
@ -1,69 +1,80 @@
|
||||||
/******/ (function(modules) { // webpackBootstrap
|
/******/ (function(modules) { // webpackBootstrap
|
||||||
/******/ // The module cache
|
/******/ // The module cache
|
||||||
/******/ var installedModules = {};
|
/******/ var installedModules = {};
|
||||||
|
/******/
|
||||||
/******/ // The require function
|
/******/ // The require function
|
||||||
/******/ function __webpack_require__(moduleId) {
|
/******/ function __webpack_require__(moduleId) {
|
||||||
|
/******/
|
||||||
/******/ // Check if module is in cache
|
/******/ // Check if module is in cache
|
||||||
/******/ if(installedModules[moduleId])
|
/******/ if(installedModules[moduleId]) {
|
||||||
/******/ return installedModules[moduleId].exports;
|
/******/ return installedModules[moduleId].exports;
|
||||||
|
/******/ }
|
||||||
/******/ // Create a new module (and put it into the cache)
|
/******/ // Create a new module (and put it into the cache)
|
||||||
/******/ var module = installedModules[moduleId] = {
|
/******/ var module = installedModules[moduleId] = {
|
||||||
/******/ i: moduleId,
|
/******/ i: moduleId,
|
||||||
/******/ l: false,
|
/******/ l: false,
|
||||||
/******/ exports: {}
|
/******/ exports: {}
|
||||||
/******/ };
|
/******/ };
|
||||||
|
/******/
|
||||||
/******/ // Execute the module function
|
/******/ // Execute the module function
|
||||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||||
|
/******/
|
||||||
/******/ // Flag the module as loaded
|
/******/ // Flag the module as loaded
|
||||||
/******/ module.l = true;
|
/******/ module.l = true;
|
||||||
|
/******/
|
||||||
/******/ // Return the exports of the module
|
/******/ // Return the exports of the module
|
||||||
/******/ return module.exports;
|
/******/ return module.exports;
|
||||||
/******/ }
|
/******/ }
|
||||||
|
/******/
|
||||||
|
/******/
|
||||||
/******/ // expose the modules object (__webpack_modules__)
|
/******/ // expose the modules object (__webpack_modules__)
|
||||||
/******/ __webpack_require__.m = modules;
|
/******/ __webpack_require__.m = modules;
|
||||||
|
/******/
|
||||||
/******/ // expose the module cache
|
/******/ // expose the module cache
|
||||||
/******/ __webpack_require__.c = installedModules;
|
/******/ __webpack_require__.c = installedModules;
|
||||||
|
/******/
|
||||||
/******/ // identity function for calling harmory imports with the correct context
|
/******/ // identity function for calling harmony imports with the correct context
|
||||||
/******/ __webpack_require__.i = function(value) { return value; };
|
/******/ __webpack_require__.i = function(value) { return value; };
|
||||||
|
/******/
|
||||||
/******/ // define getter function for harmory exports
|
/******/ // define getter function for harmony exports
|
||||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||||
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||||
/******/ Object.defineProperty(exports, name, {
|
/******/ Object.defineProperty(exports, name, {
|
||||||
/******/ configurable: false,
|
/******/ configurable: false,
|
||||||
/******/ enumerable: true,
|
/******/ enumerable: true,
|
||||||
/******/ get: getter
|
/******/ 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
|
/******/ // Object.prototype.hasOwnProperty.call
|
||||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||||
|
/******/
|
||||||
/******/ // __webpack_public_path__
|
/******/ // __webpack_public_path__
|
||||||
/******/ __webpack_require__.p = "";
|
/******/ __webpack_require__.p = "";
|
||||||
|
/******/
|
||||||
/******/ // Load entry module and return exports
|
/******/ // Load entry module and return exports
|
||||||
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
||||||
/******/ })
|
/******/ })
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
// removed by extract-text-webpack-plugin
|
// removed by extract-text-webpack-plugin
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
__webpack_require__(0);
|
__webpack_require__(0);
|
||||||
var h1 = document.createElement('h1');
|
var h1 = document.createElement('h1');
|
||||||
|
|
@ -71,5 +82,5 @@ h1.innerHTML = 'Hello world!';
|
||||||
document.body.appendChild(h1);
|
document.body.appendChild(h1);
|
||||||
|
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ]);
|
/******/ ]);
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
/******/ (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
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
/******/ ]);
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
<!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>
|
||||||
|
After Width: | Height: | Size: 766 B |
|
|
@ -0,0 +1,3 @@
|
||||||
|
body {
|
||||||
|
background: snow;
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,7 @@ var HtmlWebpackPlugin = require('../..');
|
||||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
context: __dirname,
|
||||||
entry: './example.js',
|
entry: './example.js',
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
__webpack_require__(1);
|
__webpack_require__(1);
|
||||||
var h1 = document.createElement('h1');
|
var h1 = document.createElement('h1');
|
||||||
|
|
@ -50,11 +50,11 @@
|
||||||
document.body.appendChild(h1);
|
document.body.appendChild(h1);
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
// removed by extract-text-webpack-plugin
|
// removed by extract-text-webpack-plugin
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ]);
|
/******/ ]);
|
||||||
|
|
@ -1,69 +1,80 @@
|
||||||
/******/ (function(modules) { // webpackBootstrap
|
/******/ (function(modules) { // webpackBootstrap
|
||||||
/******/ // The module cache
|
/******/ // The module cache
|
||||||
/******/ var installedModules = {};
|
/******/ var installedModules = {};
|
||||||
|
/******/
|
||||||
/******/ // The require function
|
/******/ // The require function
|
||||||
/******/ function __webpack_require__(moduleId) {
|
/******/ function __webpack_require__(moduleId) {
|
||||||
|
/******/
|
||||||
/******/ // Check if module is in cache
|
/******/ // Check if module is in cache
|
||||||
/******/ if(installedModules[moduleId])
|
/******/ if(installedModules[moduleId]) {
|
||||||
/******/ return installedModules[moduleId].exports;
|
/******/ return installedModules[moduleId].exports;
|
||||||
|
/******/ }
|
||||||
/******/ // Create a new module (and put it into the cache)
|
/******/ // Create a new module (and put it into the cache)
|
||||||
/******/ var module = installedModules[moduleId] = {
|
/******/ var module = installedModules[moduleId] = {
|
||||||
/******/ i: moduleId,
|
/******/ i: moduleId,
|
||||||
/******/ l: false,
|
/******/ l: false,
|
||||||
/******/ exports: {}
|
/******/ exports: {}
|
||||||
/******/ };
|
/******/ };
|
||||||
|
/******/
|
||||||
/******/ // Execute the module function
|
/******/ // Execute the module function
|
||||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||||
|
/******/
|
||||||
/******/ // Flag the module as loaded
|
/******/ // Flag the module as loaded
|
||||||
/******/ module.l = true;
|
/******/ module.l = true;
|
||||||
|
/******/
|
||||||
/******/ // Return the exports of the module
|
/******/ // Return the exports of the module
|
||||||
/******/ return module.exports;
|
/******/ return module.exports;
|
||||||
/******/ }
|
/******/ }
|
||||||
|
/******/
|
||||||
|
/******/
|
||||||
/******/ // expose the modules object (__webpack_modules__)
|
/******/ // expose the modules object (__webpack_modules__)
|
||||||
/******/ __webpack_require__.m = modules;
|
/******/ __webpack_require__.m = modules;
|
||||||
|
/******/
|
||||||
/******/ // expose the module cache
|
/******/ // expose the module cache
|
||||||
/******/ __webpack_require__.c = installedModules;
|
/******/ __webpack_require__.c = installedModules;
|
||||||
|
/******/
|
||||||
/******/ // identity function for calling harmory imports with the correct context
|
/******/ // identity function for calling harmony imports with the correct context
|
||||||
/******/ __webpack_require__.i = function(value) { return value; };
|
/******/ __webpack_require__.i = function(value) { return value; };
|
||||||
|
/******/
|
||||||
/******/ // define getter function for harmory exports
|
/******/ // define getter function for harmony exports
|
||||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||||
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||||
/******/ Object.defineProperty(exports, name, {
|
/******/ Object.defineProperty(exports, name, {
|
||||||
/******/ configurable: false,
|
/******/ configurable: false,
|
||||||
/******/ enumerable: true,
|
/******/ enumerable: true,
|
||||||
/******/ get: getter
|
/******/ 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
|
/******/ // Object.prototype.hasOwnProperty.call
|
||||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||||
|
/******/
|
||||||
/******/ // __webpack_public_path__
|
/******/ // __webpack_public_path__
|
||||||
/******/ __webpack_require__.p = "";
|
/******/ __webpack_require__.p = "";
|
||||||
|
/******/
|
||||||
/******/ // Load entry module and return exports
|
/******/ // Load entry module and return exports
|
||||||
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
||||||
/******/ })
|
/******/ })
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
// removed by extract-text-webpack-plugin
|
// removed by extract-text-webpack-plugin
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
__webpack_require__(0);
|
__webpack_require__(0);
|
||||||
var h1 = document.createElement('h1');
|
var h1 = document.createElement('h1');
|
||||||
|
|
@ -71,5 +82,5 @@ h1.innerHTML = 'Hello world!';
|
||||||
document.body.appendChild(h1);
|
document.body.appendChild(h1);
|
||||||
|
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ]);
|
/******/ ]);
|
||||||
|
After Width: | Height: | Size: 53 KiB |
|
|
@ -0,0 +1,11 @@
|
||||||
|
<!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>
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
/******/ (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
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
/******/ ]);
|
||||||
|
After Width: | Height: | Size: 766 B |
|
|
@ -0,0 +1,11 @@
|
||||||
|
<!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>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
body {
|
||||||
|
background: snow;
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,7 @@ var HtmlWebpackPlugin = require('../..');
|
||||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
context: __dirname,
|
||||||
entry: './example.js',
|
entry: './example.js',
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
__webpack_require__(1);
|
__webpack_require__(1);
|
||||||
|
|
@ -50,11 +50,11 @@
|
||||||
console.log('Hello World');
|
console.log('Hello World');
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
// removed by extract-text-webpack-plugin
|
// removed by extract-text-webpack-plugin
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ]);
|
/******/ ]);
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
__webpack_require__(1);
|
__webpack_require__(1);
|
||||||
|
|
@ -52,11 +52,11 @@
|
||||||
console.log('Hello World');
|
console.log('Hello World');
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
// removed by extract-text-webpack-plugin
|
// removed by extract-text-webpack-plugin
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ]);</script></body></html>
|
/******/ ]);</script></body></html>
|
||||||
|
|
@ -1,76 +1,87 @@
|
||||||
/******/ (function(modules) { // webpackBootstrap
|
/******/ (function(modules) { // webpackBootstrap
|
||||||
/******/ // The module cache
|
/******/ // The module cache
|
||||||
/******/ var installedModules = {};
|
/******/ var installedModules = {};
|
||||||
|
/******/
|
||||||
/******/ // The require function
|
/******/ // The require function
|
||||||
/******/ function __webpack_require__(moduleId) {
|
/******/ function __webpack_require__(moduleId) {
|
||||||
|
/******/
|
||||||
/******/ // Check if module is in cache
|
/******/ // Check if module is in cache
|
||||||
/******/ if(installedModules[moduleId])
|
/******/ if(installedModules[moduleId]) {
|
||||||
/******/ return installedModules[moduleId].exports;
|
/******/ return installedModules[moduleId].exports;
|
||||||
|
/******/ }
|
||||||
/******/ // Create a new module (and put it into the cache)
|
/******/ // Create a new module (and put it into the cache)
|
||||||
/******/ var module = installedModules[moduleId] = {
|
/******/ var module = installedModules[moduleId] = {
|
||||||
/******/ i: moduleId,
|
/******/ i: moduleId,
|
||||||
/******/ l: false,
|
/******/ l: false,
|
||||||
/******/ exports: {}
|
/******/ exports: {}
|
||||||
/******/ };
|
/******/ };
|
||||||
|
/******/
|
||||||
/******/ // Execute the module function
|
/******/ // Execute the module function
|
||||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||||
|
/******/
|
||||||
/******/ // Flag the module as loaded
|
/******/ // Flag the module as loaded
|
||||||
/******/ module.l = true;
|
/******/ module.l = true;
|
||||||
|
/******/
|
||||||
/******/ // Return the exports of the module
|
/******/ // Return the exports of the module
|
||||||
/******/ return module.exports;
|
/******/ return module.exports;
|
||||||
/******/ }
|
/******/ }
|
||||||
|
/******/
|
||||||
|
/******/
|
||||||
/******/ // expose the modules object (__webpack_modules__)
|
/******/ // expose the modules object (__webpack_modules__)
|
||||||
/******/ __webpack_require__.m = modules;
|
/******/ __webpack_require__.m = modules;
|
||||||
|
/******/
|
||||||
/******/ // expose the module cache
|
/******/ // expose the module cache
|
||||||
/******/ __webpack_require__.c = installedModules;
|
/******/ __webpack_require__.c = installedModules;
|
||||||
|
/******/
|
||||||
/******/ // identity function for calling harmory imports with the correct context
|
/******/ // identity function for calling harmony imports with the correct context
|
||||||
/******/ __webpack_require__.i = function(value) { return value; };
|
/******/ __webpack_require__.i = function(value) { return value; };
|
||||||
|
/******/
|
||||||
/******/ // define getter function for harmory exports
|
/******/ // define getter function for harmony exports
|
||||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||||
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||||
/******/ Object.defineProperty(exports, name, {
|
/******/ Object.defineProperty(exports, name, {
|
||||||
/******/ configurable: false,
|
/******/ configurable: false,
|
||||||
/******/ enumerable: true,
|
/******/ enumerable: true,
|
||||||
/******/ get: getter
|
/******/ 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
|
/******/ // Object.prototype.hasOwnProperty.call
|
||||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||||
|
/******/
|
||||||
/******/ // __webpack_public_path__
|
/******/ // __webpack_public_path__
|
||||||
/******/ __webpack_require__.p = "";
|
/******/ __webpack_require__.p = "";
|
||||||
|
/******/
|
||||||
/******/ // Load entry module and return exports
|
/******/ // Load entry module and return exports
|
||||||
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
||||||
/******/ })
|
/******/ })
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
// removed by extract-text-webpack-plugin
|
// removed by extract-text-webpack-plugin
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
'use strict';
|
|
||||||
__webpack_require__(0);
|
__webpack_require__(0);
|
||||||
|
|
||||||
console.log('Hello World');
|
console.log('Hello World');
|
||||||
|
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ]);
|
/******/ ]);
|
||||||
|
|
@ -3,76 +3,87 @@
|
||||||
}</style><script type="text/javascript">/******/ (function(modules) { // webpackBootstrap
|
}</style><script type="text/javascript">/******/ (function(modules) { // webpackBootstrap
|
||||||
/******/ // The module cache
|
/******/ // The module cache
|
||||||
/******/ var installedModules = {};
|
/******/ var installedModules = {};
|
||||||
|
/******/
|
||||||
/******/ // The require function
|
/******/ // The require function
|
||||||
/******/ function __webpack_require__(moduleId) {
|
/******/ function __webpack_require__(moduleId) {
|
||||||
|
/******/
|
||||||
/******/ // Check if module is in cache
|
/******/ // Check if module is in cache
|
||||||
/******/ if(installedModules[moduleId])
|
/******/ if(installedModules[moduleId]) {
|
||||||
/******/ return installedModules[moduleId].exports;
|
/******/ return installedModules[moduleId].exports;
|
||||||
|
/******/ }
|
||||||
/******/ // Create a new module (and put it into the cache)
|
/******/ // Create a new module (and put it into the cache)
|
||||||
/******/ var module = installedModules[moduleId] = {
|
/******/ var module = installedModules[moduleId] = {
|
||||||
/******/ i: moduleId,
|
/******/ i: moduleId,
|
||||||
/******/ l: false,
|
/******/ l: false,
|
||||||
/******/ exports: {}
|
/******/ exports: {}
|
||||||
/******/ };
|
/******/ };
|
||||||
|
/******/
|
||||||
/******/ // Execute the module function
|
/******/ // Execute the module function
|
||||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||||
|
/******/
|
||||||
/******/ // Flag the module as loaded
|
/******/ // Flag the module as loaded
|
||||||
/******/ module.l = true;
|
/******/ module.l = true;
|
||||||
|
/******/
|
||||||
/******/ // Return the exports of the module
|
/******/ // Return the exports of the module
|
||||||
/******/ return module.exports;
|
/******/ return module.exports;
|
||||||
/******/ }
|
/******/ }
|
||||||
|
/******/
|
||||||
|
/******/
|
||||||
/******/ // expose the modules object (__webpack_modules__)
|
/******/ // expose the modules object (__webpack_modules__)
|
||||||
/******/ __webpack_require__.m = modules;
|
/******/ __webpack_require__.m = modules;
|
||||||
|
/******/
|
||||||
/******/ // expose the module cache
|
/******/ // expose the module cache
|
||||||
/******/ __webpack_require__.c = installedModules;
|
/******/ __webpack_require__.c = installedModules;
|
||||||
|
/******/
|
||||||
/******/ // identity function for calling harmory imports with the correct context
|
/******/ // identity function for calling harmony imports with the correct context
|
||||||
/******/ __webpack_require__.i = function(value) { return value; };
|
/******/ __webpack_require__.i = function(value) { return value; };
|
||||||
|
/******/
|
||||||
/******/ // define getter function for harmory exports
|
/******/ // define getter function for harmony exports
|
||||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||||
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||||
/******/ Object.defineProperty(exports, name, {
|
/******/ Object.defineProperty(exports, name, {
|
||||||
/******/ configurable: false,
|
/******/ configurable: false,
|
||||||
/******/ enumerable: true,
|
/******/ enumerable: true,
|
||||||
/******/ get: getter
|
/******/ 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
|
/******/ // Object.prototype.hasOwnProperty.call
|
||||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||||
|
/******/
|
||||||
/******/ // __webpack_public_path__
|
/******/ // __webpack_public_path__
|
||||||
/******/ __webpack_require__.p = "";
|
/******/ __webpack_require__.p = "";
|
||||||
|
/******/
|
||||||
/******/ // Load entry module and return exports
|
/******/ // Load entry module and return exports
|
||||||
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
||||||
/******/ })
|
/******/ })
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
// removed by extract-text-webpack-plugin
|
// removed by extract-text-webpack-plugin
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
'use strict';
|
|
||||||
__webpack_require__(0);
|
__webpack_require__(0);
|
||||||
|
|
||||||
console.log('Hello World');
|
console.log('Hello World');
|
||||||
|
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ]);</script></body></html>
|
/******/ ]);</script></body></html>
|
||||||
|
|
@ -0,0 +1,84 @@
|
||||||
|
/******/ (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
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
/******/ ]);
|
||||||
|
After Width: | Height: | Size: 766 B |
|
|
@ -0,0 +1,86 @@
|
||||||
|
<!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>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
body {
|
||||||
|
background: snow;
|
||||||
|
}
|
||||||
|
|
@ -4,6 +4,7 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
context: __dirname,
|
||||||
entry: './example.js',
|
entry: './example.js',
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
||||||
|
|
@ -13,7 +14,7 @@ module.exports = {
|
||||||
module: {
|
module: {
|
||||||
loaders: [
|
loaders: [
|
||||||
{ test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') },
|
{ test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') },
|
||||||
{ test: /\.jade$/, loader: 'jade' }
|
{ test: /\.jade$/, loader: 'jade-loader' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
__webpack_require__(1);
|
__webpack_require__(1);
|
||||||
|
|
@ -56,18 +56,18 @@
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
// removed by extract-text-webpack-plugin
|
// removed by extract-text-webpack-plugin
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 2 */,
|
/* 2 */,
|
||||||
/* 3 */,
|
/* 3 */,
|
||||||
/* 4 */,
|
/* 4 */,
|
||||||
/* 5 */
|
/* 5 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
var jade = __webpack_require__(6);
|
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("");
|
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 */
|
/* 6 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
@ -331,17 +331,17 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 7 */
|
/* 7 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
/* (ignored) */
|
/* (ignored) */
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 8 */
|
/* 8 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
module.exports = __webpack_require__.p + "0714810ae3fb211173e2964249507195.png";
|
module.exports = __webpack_require__.p + "0714810ae3fb211173e2964249507195.png";
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ]);
|
/******/ ]);
|
||||||
|
|
@ -1,69 +1,80 @@
|
||||||
/******/ (function(modules) { // webpackBootstrap
|
/******/ (function(modules) { // webpackBootstrap
|
||||||
/******/ // The module cache
|
/******/ // The module cache
|
||||||
/******/ var installedModules = {};
|
/******/ var installedModules = {};
|
||||||
|
/******/
|
||||||
/******/ // The require function
|
/******/ // The require function
|
||||||
/******/ function __webpack_require__(moduleId) {
|
/******/ function __webpack_require__(moduleId) {
|
||||||
|
/******/
|
||||||
/******/ // Check if module is in cache
|
/******/ // Check if module is in cache
|
||||||
/******/ if(installedModules[moduleId])
|
/******/ if(installedModules[moduleId]) {
|
||||||
/******/ return installedModules[moduleId].exports;
|
/******/ return installedModules[moduleId].exports;
|
||||||
|
/******/ }
|
||||||
/******/ // Create a new module (and put it into the cache)
|
/******/ // Create a new module (and put it into the cache)
|
||||||
/******/ var module = installedModules[moduleId] = {
|
/******/ var module = installedModules[moduleId] = {
|
||||||
/******/ i: moduleId,
|
/******/ i: moduleId,
|
||||||
/******/ l: false,
|
/******/ l: false,
|
||||||
/******/ exports: {}
|
/******/ exports: {}
|
||||||
/******/ };
|
/******/ };
|
||||||
|
/******/
|
||||||
/******/ // Execute the module function
|
/******/ // Execute the module function
|
||||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||||
|
/******/
|
||||||
/******/ // Flag the module as loaded
|
/******/ // Flag the module as loaded
|
||||||
/******/ module.l = true;
|
/******/ module.l = true;
|
||||||
|
/******/
|
||||||
/******/ // Return the exports of the module
|
/******/ // Return the exports of the module
|
||||||
/******/ return module.exports;
|
/******/ return module.exports;
|
||||||
/******/ }
|
/******/ }
|
||||||
|
/******/
|
||||||
|
/******/
|
||||||
/******/ // expose the modules object (__webpack_modules__)
|
/******/ // expose the modules object (__webpack_modules__)
|
||||||
/******/ __webpack_require__.m = modules;
|
/******/ __webpack_require__.m = modules;
|
||||||
|
/******/
|
||||||
/******/ // expose the module cache
|
/******/ // expose the module cache
|
||||||
/******/ __webpack_require__.c = installedModules;
|
/******/ __webpack_require__.c = installedModules;
|
||||||
|
/******/
|
||||||
/******/ // identity function for calling harmory imports with the correct context
|
/******/ // identity function for calling harmony imports with the correct context
|
||||||
/******/ __webpack_require__.i = function(value) { return value; };
|
/******/ __webpack_require__.i = function(value) { return value; };
|
||||||
|
/******/
|
||||||
/******/ // define getter function for harmory exports
|
/******/ // define getter function for harmony exports
|
||||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||||
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||||
/******/ Object.defineProperty(exports, name, {
|
/******/ Object.defineProperty(exports, name, {
|
||||||
/******/ configurable: false,
|
/******/ configurable: false,
|
||||||
/******/ enumerable: true,
|
/******/ enumerable: true,
|
||||||
/******/ get: getter
|
/******/ 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
|
/******/ // Object.prototype.hasOwnProperty.call
|
||||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||||
|
/******/
|
||||||
/******/ // __webpack_public_path__
|
/******/ // __webpack_public_path__
|
||||||
/******/ __webpack_require__.p = "";
|
/******/ __webpack_require__.p = "";
|
||||||
|
/******/
|
||||||
/******/ // Load entry module and return exports
|
/******/ // Load entry module and return exports
|
||||||
/******/ return __webpack_require__(__webpack_require__.s = 2);
|
/******/ return __webpack_require__(__webpack_require__.s = 2);
|
||||||
/******/ })
|
/******/ })
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
// removed by extract-text-webpack-plugin
|
// removed by extract-text-webpack-plugin
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
var jade = __webpack_require__(4);
|
var jade = __webpack_require__(4);
|
||||||
|
|
||||||
|
|
@ -75,12 +86,12 @@ var jade_interp;
|
||||||
buf.push("<!-- this partial is used for frontend and backend--><div class=\"time\"> <b>Current time</b><p>" + (jade.escape((jade_interp = time.toISOString()) == null ? '' : jade_interp)) + "</p></div><img" + (jade.attr("src", "" + (__webpack_require__(3)) + "", true, true)) + ">");}.call(this,"time" in locals_for_with?locals_for_with.time:typeof time!=="undefined"?time:undefined));;return buf.join("");
|
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 */
|
/* 2 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
'use strict';
|
|
||||||
__webpack_require__(0);
|
__webpack_require__(0);
|
||||||
// Use the same template for the frontend code
|
// Use the same template for the frontend code
|
||||||
var template = __webpack_require__(1);
|
var template = __webpack_require__(1);
|
||||||
|
|
@ -92,18 +103,18 @@ setInterval(function () {
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 3 */
|
/* 3 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
module.exports = __webpack_require__.p + "0714810ae3fb211173e2964249507195.png";
|
module.exports = __webpack_require__.p + "0714810ae3fb211173e2964249507195.png";
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 4 */
|
/* 4 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
'use strict';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Merge two attribute objects giving precedence
|
* Merge two attribute objects giving precedence
|
||||||
|
|
@ -351,11 +362,11 @@ exports.DebugItem = function DebugItem(lineno, filename) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 5 */
|
/* 5 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
/* (ignored) */
|
/* (ignored) */
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ]);
|
/******/ ]);
|
||||||
|
After Width: | Height: | Size: 53 KiB |
|
|
@ -0,0 +1,369 @@
|
||||||
|
/******/ (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";
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
/******/ ]);
|
||||||
|
After Width: | Height: | Size: 766 B |
|
|
@ -0,0 +1 @@
|
||||||
|
<!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>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
body {
|
||||||
|
background: snow;
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,7 @@ var HtmlWebpackPlugin = require('../..');
|
||||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
context: __dirname,
|
||||||
entry: './example.js',
|
entry: './example.js',
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
||||||
|
|
@ -13,7 +14,7 @@ module.exports = {
|
||||||
loaders: [
|
loaders: [
|
||||||
{ test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') },
|
{ test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') },
|
||||||
{ test: /\.png$/, loader: 'file-loader' },
|
{ test: /\.png$/, loader: 'file-loader' },
|
||||||
{ test: /\.jade$/, loader: 'jade' }
|
{ test: /\.jade$/, loader: 'jade-loader' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|
|
||||||
|
|
@ -42,15 +42,24 @@
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
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?");
|
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 */
|
/* 1 */
|
||||||
/***/ 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 = 1\n// module chunks = 0\n//# sourceURL=webpack:///./universial.js?");
|
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) {
|
||||||
|
|
||||||
|
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>/index.js: Webpack App</title></head><body>Hello World from backend - <h2>Partial</h2>
|
<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>
|
<img src="0714810ae3fb211173e2964249507195.png"><script type="text/javascript" src="bundle.js"></script></body></html>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
body {
|
||||||
|
background: snow;
|
||||||
|
}
|
||||||
|
|
@ -1,50 +1,52 @@
|
||||||
/******/ (function(modules) { // webpackBootstrap
|
/******/ (function(modules) { // webpackBootstrap
|
||||||
/******/ // The module cache
|
/******/ // The module cache
|
||||||
/******/ var installedModules = {};
|
/******/ var installedModules = {};
|
||||||
|
/******/
|
||||||
/******/ // The require function
|
/******/ // The require function
|
||||||
/******/ function __webpack_require__(moduleId) {
|
/******/ function __webpack_require__(moduleId) {
|
||||||
|
/******/
|
||||||
/******/ // Check if module is in cache
|
/******/ // Check if module is in cache
|
||||||
/******/ if(installedModules[moduleId])
|
/******/ if(installedModules[moduleId]) {
|
||||||
/******/ return installedModules[moduleId].exports;
|
/******/ return installedModules[moduleId].exports;
|
||||||
|
/******/ }
|
||||||
/******/ // Create a new module (and put it into the cache)
|
/******/ // Create a new module (and put it into the cache)
|
||||||
/******/ var module = installedModules[moduleId] = {
|
/******/ var module = installedModules[moduleId] = {
|
||||||
/******/ i: moduleId,
|
/******/ i: moduleId,
|
||||||
/******/ l: false,
|
/******/ l: false,
|
||||||
/******/ exports: {}
|
/******/ exports: {}
|
||||||
/******/ };
|
/******/ };
|
||||||
|
/******/
|
||||||
/******/ // Execute the module function
|
/******/ // Execute the module function
|
||||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||||
|
/******/
|
||||||
/******/ // Flag the module as loaded
|
/******/ // Flag the module as loaded
|
||||||
/******/ module.l = true;
|
/******/ module.l = true;
|
||||||
|
/******/
|
||||||
/******/ // Return the exports of the module
|
/******/ // Return the exports of the module
|
||||||
/******/ return module.exports;
|
/******/ return module.exports;
|
||||||
/******/ }
|
/******/ }
|
||||||
|
/******/
|
||||||
|
/******/
|
||||||
/******/ // expose the modules object (__webpack_modules__)
|
/******/ // expose the modules object (__webpack_modules__)
|
||||||
/******/ __webpack_require__.m = modules;
|
/******/ __webpack_require__.m = modules;
|
||||||
|
/******/
|
||||||
/******/ // expose the module cache
|
/******/ // expose the module cache
|
||||||
/******/ __webpack_require__.c = installedModules;
|
/******/ __webpack_require__.c = installedModules;
|
||||||
|
/******/
|
||||||
/******/ // identity function for calling harmory imports with the correct context
|
/******/ // identity function for calling harmony imports with the correct context
|
||||||
/******/ __webpack_require__.i = function(value) { return value; };
|
/******/ __webpack_require__.i = function(value) { return value; };
|
||||||
|
/******/
|
||||||
/******/ // define getter function for harmory exports
|
/******/ // define getter function for harmony exports
|
||||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||||
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||||
/******/ Object.defineProperty(exports, name, {
|
/******/ Object.defineProperty(exports, name, {
|
||||||
/******/ configurable: false,
|
/******/ configurable: false,
|
||||||
/******/ enumerable: true,
|
/******/ enumerable: true,
|
||||||
/******/ get: getter
|
/******/ get: getter
|
||||||
/******/ });
|
/******/ });
|
||||||
|
/******/ }
|
||||||
/******/ };
|
/******/ };
|
||||||
|
/******/
|
||||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||||
/******/ __webpack_require__.n = function(module) {
|
/******/ __webpack_require__.n = function(module) {
|
||||||
/******/ var getter = module && module.__esModule ?
|
/******/ var getter = module && module.__esModule ?
|
||||||
|
|
@ -53,35 +55,35 @@
|
||||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||||
/******/ return getter;
|
/******/ return getter;
|
||||||
/******/ };
|
/******/ };
|
||||||
|
/******/
|
||||||
/******/ // Object.prototype.hasOwnProperty.call
|
/******/ // Object.prototype.hasOwnProperty.call
|
||||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||||
|
/******/
|
||||||
/******/ // __webpack_public_path__
|
/******/ // __webpack_public_path__
|
||||||
/******/ __webpack_require__.p = "";
|
/******/ __webpack_require__.p = "";
|
||||||
|
/******/
|
||||||
/******/ // Load entry module and return exports
|
/******/ // Load entry module and return exports
|
||||||
/******/ return __webpack_require__(__webpack_require__.s = 2);
|
/******/ return __webpack_require__(__webpack_require__.s = 2);
|
||||||
/******/ })
|
/******/ })
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
eval("// This file is used for frontend and backend\n'use strict';\n\n// If compiled by the html-webpack-plugin\n// HTML_WEBPACK_PLUGIN is set to true:\nvar backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined';\n\nmodule.exports = function () {\n return 'Hello World from ' + (backend ? 'backend' : 'frontend');\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./universial.js\n// module id = 0\n// module chunks = 0\n\n//# sourceURL=webpack:///./universial.js?");
|
eval("// This file is used for frontend and backend\n\n\n// If compiled by the html-webpack-plugin\n// HTML_WEBPACK_PLUGIN is set to true:\nvar backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined';\n\nmodule.exports = function () {\n return 'Hello World from ' + (backend ? 'backend' : 'frontend');\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./universial.js\n// module id = 0\n// module chunks = 0\n\n//# sourceURL=webpack:///./universial.js?");
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 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?");
|
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 */
|
/* 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?");
|
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>template.js: Webpack App</title><link href="styles.css" rel="stylesheet"></head><body>Hello World from backend - <h2>Partial</h2>
|
<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>
|
<img src="0714810ae3fb211173e2964249507195.png"><script type="text/javascript" src="bundle.js"></script></body></html>
|
||||||
BIN
examples/javascript-advanced/dist/webpack-3/0714810ae3fb211173e2964249507195.png
vendored
Normal file
|
After Width: | Height: | Size: 53 KiB |
|
|
@ -0,0 +1,86 @@
|
||||||
|
/******/ (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?");
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
/******/ ]);
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
<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>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
body {
|
||||||
|
background: snow;
|
||||||
|
}
|
||||||
|
|
@ -5,9 +5,8 @@ var universal = require('./universial.js');
|
||||||
// Export a function / promise / or a string:
|
// Export a function / promise / or a string:
|
||||||
// This function has to return a string or promised string:
|
// This function has to return a string or promised string:
|
||||||
module.exports = function (templateParams) {
|
module.exports = function (templateParams) {
|
||||||
var filename = __filename;
|
|
||||||
var html = '<html><head>' +
|
var html = '<html><head>' +
|
||||||
'<title>' + filename + ': ' + templateParams.htmlWebpackPlugin.options.title + '</title>' +
|
'<title>' + templateParams.htmlWebpackPlugin.options.title + '</title>' +
|
||||||
'</head><body>' + universal() + ' - ' + partial + '</body></html>';
|
'</head><body>' + universal() + ' - ' + partial + '</body></html>';
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ var HtmlWebpackPlugin = require('../..');
|
||||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
context: __dirname,
|
||||||
entry: './example.js',
|
entry: './example.js',
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
||||||
|
|
@ -11,7 +12,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
loaders: [
|
loaders: [
|
||||||
{ test: /\.css$/, loader: ExtractTextPlugin.extract({loader: 'css-loader'}) },
|
{ test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') },
|
||||||
{ test: /\.png$/, loader: 'file-loader' },
|
{ test: /\.png$/, loader: 'file-loader' },
|
||||||
{ test: /\.html$/, loader: 'html-loader' }
|
{ test: /\.html$/, loader: 'html-loader' }
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -42,24 +42,24 @@
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 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__(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 */
|
/* 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("// 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 */,
|
/* 2 */,
|
||||||
/* 3 */,
|
/* 3 */,
|
||||||
/* 4 */,
|
/* 4 */,
|
||||||
/* 5 */
|
/* 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?");
|
eval("// This file is used for frontend and backend\n'use strict';\n\n// If compiled by the html-webpack-plugin\n// HTML_WEBPACK_PLUGIN is set to true:\nvar backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined';\n\nmodule.exports = function () {\n return 'Hello World from ' + (backend ? 'backend' : 'frontend');\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./universial.js\n// module id = 5\n// module chunks = 0\n//# sourceURL=webpack:///./universial.js?");
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ]);
|
/******/ ]);
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
<head><link href="styles.css" rel="stylesheet"></head>Hello World from backend2016-10-29T07:11:51.268Z<h2>Partial</h2>
|
<head><link href="styles.css" rel="stylesheet"></head>Hello World from backend2017-04-17T17:13:11.491Z<h2>Partial</h2>
|
||||||
<img src="0714810ae3fb211173e2964249507195.png"><script type="text/javascript" src="bundle.js"></script>
|
<img src="0714810ae3fb211173e2964249507195.png"><script type="text/javascript" src="bundle.js"></script>
|
||||||
|
|
@ -1,78 +1,89 @@
|
||||||
/******/ (function(modules) { // webpackBootstrap
|
/******/ (function(modules) { // webpackBootstrap
|
||||||
/******/ // The module cache
|
/******/ // The module cache
|
||||||
/******/ var installedModules = {};
|
/******/ var installedModules = {};
|
||||||
|
/******/
|
||||||
/******/ // The require function
|
/******/ // The require function
|
||||||
/******/ function __webpack_require__(moduleId) {
|
/******/ function __webpack_require__(moduleId) {
|
||||||
|
/******/
|
||||||
/******/ // Check if module is in cache
|
/******/ // Check if module is in cache
|
||||||
/******/ if(installedModules[moduleId])
|
/******/ if(installedModules[moduleId]) {
|
||||||
/******/ return installedModules[moduleId].exports;
|
/******/ return installedModules[moduleId].exports;
|
||||||
|
/******/ }
|
||||||
/******/ // Create a new module (and put it into the cache)
|
/******/ // Create a new module (and put it into the cache)
|
||||||
/******/ var module = installedModules[moduleId] = {
|
/******/ var module = installedModules[moduleId] = {
|
||||||
/******/ i: moduleId,
|
/******/ i: moduleId,
|
||||||
/******/ l: false,
|
/******/ l: false,
|
||||||
/******/ exports: {}
|
/******/ exports: {}
|
||||||
/******/ };
|
/******/ };
|
||||||
|
/******/
|
||||||
/******/ // Execute the module function
|
/******/ // Execute the module function
|
||||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||||
|
/******/
|
||||||
/******/ // Flag the module as loaded
|
/******/ // Flag the module as loaded
|
||||||
/******/ module.l = true;
|
/******/ module.l = true;
|
||||||
|
/******/
|
||||||
/******/ // Return the exports of the module
|
/******/ // Return the exports of the module
|
||||||
/******/ return module.exports;
|
/******/ return module.exports;
|
||||||
/******/ }
|
/******/ }
|
||||||
|
/******/
|
||||||
|
/******/
|
||||||
/******/ // expose the modules object (__webpack_modules__)
|
/******/ // expose the modules object (__webpack_modules__)
|
||||||
/******/ __webpack_require__.m = modules;
|
/******/ __webpack_require__.m = modules;
|
||||||
|
/******/
|
||||||
/******/ // expose the module cache
|
/******/ // expose the module cache
|
||||||
/******/ __webpack_require__.c = installedModules;
|
/******/ __webpack_require__.c = installedModules;
|
||||||
|
/******/
|
||||||
/******/ // identity function for calling harmory imports with the correct context
|
/******/ // identity function for calling harmony imports with the correct context
|
||||||
/******/ __webpack_require__.i = function(value) { return value; };
|
/******/ __webpack_require__.i = function(value) { return value; };
|
||||||
|
/******/
|
||||||
/******/ // define getter function for harmory exports
|
/******/ // define getter function for harmony exports
|
||||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||||
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||||
/******/ Object.defineProperty(exports, name, {
|
/******/ Object.defineProperty(exports, name, {
|
||||||
/******/ configurable: false,
|
/******/ configurable: false,
|
||||||
/******/ enumerable: true,
|
/******/ enumerable: true,
|
||||||
/******/ get: getter
|
/******/ 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
|
/******/ // Object.prototype.hasOwnProperty.call
|
||||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||||
|
/******/
|
||||||
/******/ // __webpack_public_path__
|
/******/ // __webpack_public_path__
|
||||||
/******/ __webpack_require__.p = "";
|
/******/ __webpack_require__.p = "";
|
||||||
|
/******/
|
||||||
/******/ // Load entry module and return exports
|
/******/ // Load entry module and return exports
|
||||||
/******/ return __webpack_require__(__webpack_require__.s = 2);
|
/******/ return __webpack_require__(__webpack_require__.s = 2);
|
||||||
/******/ })
|
/******/ })
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
eval("// This file is used for frontend and backend\n'use strict';\n\n// If compiled by the html-webpack-plugin\n// HTML_WEBPACK_PLUGIN is set to true:\nvar backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined';\n\nmodule.exports = function () {\n return 'Hello World from ' + (backend ? 'backend' : 'frontend');\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./universial.js\n// module id = 0\n// module chunks = 0\n\n//# sourceURL=webpack:///./universial.js?");
|
eval("// This file is used for frontend and backend\n\n\n// If compiled by the html-webpack-plugin\n// HTML_WEBPACK_PLUGIN is set to true:\nvar backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined';\n\nmodule.exports = function () {\n return 'Hello World from ' + (backend ? 'backend' : 'frontend');\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./universial.js\n// module id = 0\n// module chunks = 0\n\n//# sourceURL=webpack:///./universial.js?");
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 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?");
|
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 */
|
/* 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?");
|
eval("__webpack_require__(1);\n\nvar universal = __webpack_require__(0);\nvar h1 = document.createElement('h1');\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./example.js\n// module id = 2\n// module chunks = 0\n\n//# sourceURL=webpack:///./example.js?");
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ]);
|
/******/ ]);
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
<head><link href="styles.css" rel="stylesheet"></head>Hello World from backend2016-07-02T10:27:15.263Z<h2>Partial</h2>
|
<head><link href="styles.css" rel="stylesheet"></head>Hello World from backend2017-04-17T17:12:14.752Z<h2>Partial</h2>
|
||||||
<img src="0714810ae3fb211173e2964249507195.png"><script type="text/javascript" src="bundle.js"></script>
|
<img src="0714810ae3fb211173e2964249507195.png"><script type="text/javascript" src="bundle.js"></script>
|
||||||
|
After Width: | Height: | Size: 53 KiB |
|
|
@ -0,0 +1,86 @@
|
||||||
|
/******/ (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?");
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
/******/ ]);
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
<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>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
body {
|
||||||
|
background: snow;
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,7 @@ var HtmlWebpackPlugin = require('../..');
|
||||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||||
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
var webpackMajorVersion = require('webpack/package.json').version.split('.')[0];
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
context: __dirname,
|
||||||
entry: './example.js',
|
entry: './example.js',
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion),
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
require('./main.css');
|
||||||
|
var h1 = document.createElement('h1');
|
||||||
|
h1.innerHTML = 'a!';
|
||||||
|
document.body.appendChild(h1);
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
var h1 = document.createElement('h1');
|
||||||
|
h1.innerHTML = 'b!';
|
||||||
|
document.body.appendChild(h1);
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
var h1 = document.createElement('h1');
|
||||||
|
h1.innerHTML = 'c!';
|
||||||
|
document.body.appendChild(h1);
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
var h1 = document.createElement('h1');
|
||||||
|
h1.innerHTML = 'd!';
|
||||||
|
document.body.appendChild(h1);
|
||||||
|
After Width: | Height: | Size: 53 KiB |
|
|
@ -0,0 +1,60 @@
|
||||||
|
/******/ (function(modules) { // webpackBootstrap
|
||||||
|
/******/ // The module cache
|
||||||
|
/******/ var installedModules = {};
|
||||||
|
|
||||||
|
/******/ // The require function
|
||||||
|
/******/ function __webpack_require__(moduleId) {
|
||||||
|
|
||||||
|
/******/ // Check if module is in cache
|
||||||
|
/******/ if(installedModules[moduleId])
|
||||||
|
/******/ return installedModules[moduleId].exports;
|
||||||
|
|
||||||
|
/******/ // Create a new module (and put it into the cache)
|
||||||
|
/******/ var module = installedModules[moduleId] = {
|
||||||
|
/******/ exports: {},
|
||||||
|
/******/ id: moduleId,
|
||||||
|
/******/ loaded: false
|
||||||
|
/******/ };
|
||||||
|
|
||||||
|
/******/ // Execute the module function
|
||||||
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||||
|
|
||||||
|
/******/ // Flag the module as loaded
|
||||||
|
/******/ module.loaded = true;
|
||||||
|
|
||||||
|
/******/ // Return the exports of the module
|
||||||
|
/******/ return module.exports;
|
||||||
|
/******/ }
|
||||||
|
|
||||||
|
|
||||||
|
/******/ // expose the modules object (__webpack_modules__)
|
||||||
|
/******/ __webpack_require__.m = modules;
|
||||||
|
|
||||||
|
/******/ // expose the module cache
|
||||||
|
/******/ __webpack_require__.c = installedModules;
|
||||||
|
|
||||||
|
/******/ // __webpack_public_path__
|
||||||
|
/******/ __webpack_require__.p = "";
|
||||||
|
|
||||||
|
/******/ // Load entry module and return exports
|
||||||
|
/******/ return __webpack_require__(0);
|
||||||
|
/******/ })
|
||||||
|
/************************************************************************/
|
||||||
|
/******/ ([
|
||||||
|
/* 0 */
|
||||||
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
__webpack_require__(1);
|
||||||
|
var h1 = document.createElement('h1');
|
||||||
|
h1.innerHTML = 'a!';
|
||||||
|
document.body.appendChild(h1);
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
/* 1 */
|
||||||
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
|
// removed by extract-text-webpack-plugin
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
/******/ ]);
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
/******/ (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);
|
||||||
|
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
/******/ ]);
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
/******/ (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);
|
||||||
|
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
/******/ ]);
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
/******/ (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);
|
||||||
|
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
/******/ ]);
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
/******/ (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);
|
||||||
|
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
/******/ ]);
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
<!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>
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
<!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>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
body {
|
||||||
|
background: snow;
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 53 KiB |
|
|
@ -0,0 +1,86 @@
|
||||||
|
/******/ (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);
|
||||||
|
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
/******/ ]);
|
||||||
|
|
@ -0,0 +1,81 @@
|
||||||
|
/******/ (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 = 2);
|
||||||
|
/******/ })
|
||||||
|
/************************************************************************/
|
||||||
|
/******/ ({
|
||||||
|
|
||||||
|
/***/ 2:
|
||||||
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
|
var h1 = document.createElement('h1');
|
||||||
|
h1.innerHTML = 'b!';
|
||||||
|
document.body.appendChild(h1);
|
||||||
|
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
|
||||||
|
/******/ });
|
||||||
|
|
@ -0,0 +1,81 @@
|
||||||
|
/******/ (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 = 3);
|
||||||
|
/******/ })
|
||||||
|
/************************************************************************/
|
||||||
|
/******/ ({
|
||||||
|
|
||||||
|
/***/ 3:
|
||||||
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
|
var h1 = document.createElement('h1');
|
||||||
|
h1.innerHTML = 'c!';
|
||||||
|
document.body.appendChild(h1);
|
||||||
|
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
|
||||||
|
/******/ });
|
||||||