Commit Graph

151 Commits

Author SHA1 Message Date
Thomas Sileghem 0cf580c628 fix(template): prevent undefined error in template loader (#754) 2017-07-31 16:45:25 +02:00
Sergio Cinos cb150718a3 Uses a singleton cache to store the compilation stats (#723)
* Uses a singleton cache to store the compilation stats

* Use compilation.hash as the index for the cached stats

* Remove calls to compilation.getStats().toJson() because it is expensive and we actually don't need it

* Remove debugger statement

* Make changes compatible with webpack2

* Use json representation for chunks to avoid breaking `chunksSortMode`
2017-07-17 07:30:18 +02:00
skiny2015 6f15d185da Add manual sort mode 2017-07-03 17:10:10 +02:00
Anchen bd043db35d Change headReg and bodyReg to allow spaces (#709)
* change headReg and bodyReg to allow spaces

* change regex to only allow space before closing tag
2017-06-29 09:08:52 +02:00
Mike Evans 2d5c42ff18 chunks passed to alter-assets event (#574) 2017-01-29 15:07:05 +01:00
Jan Nicklas 73a01bdcaf Release 2.28.0 2017-01-29 14:48:23 +01:00
Jan Nicklas 9bdb6189ea Release 2.27.1 2017-01-29 14:46:14 +01:00
Arseny 7a781a4120 Fix template compilation for es6 modules (#550) 2017-01-20 12:11:09 +01:00
Peach 1b4f8efe94 Fix template path resolving regexp to support loader query parameters (#542) 2017-01-11 10:09:30 +01:00
Mike Evans d22c23066a Allows events to add no-value attributes 2017-01-03 22:22:30 +01:00
Jan Nicklas f3abe9f6ae Update dependencies 2016-12-31 00:17:23 +01:00
Jan Nicklas 9046e46d12 Cleaner webpack compilation output 2016-12-30 20:09:42 +01:00
Jan Nicklas b2db3f91e9 Refactor chunk filtering 2016-11-15 09:24:30 +01:00
Jan Nicklas 8ed2159b9d Improve readability 2016-11-11 09:52:41 +01:00
Andrea Ascari bac1cd4469 Hide event deprecated warning of 'applyPluginsAsyncWaterfall' for html-webpack-plugin-after-emit and improve the warning message. (#478) 2016-10-31 08:52:31 +01:00
Andrea Ascari 4e29b022b8 Made before and after "html-processing" events use callback value (#442)
* Used returned value from applyPluginsAsyncWaterfall promise instead of referred object.
* Removed the possibility to alter 'html' and 'assets' in 'html-webpack-plugin-alter-asset-tags'.
* Added warning for non returned result from 'html-webpack-plugin-after-html-processing' and fixed tests.
2016-10-12 14:23:13 +02:00
christoph peter 9757d3df30 replace [hash] in publicPath of favicon (#441) 2016-09-26 12:29:30 +02:00
Michał Gołębiowski d0105fd7a7 Don't treat templateContent set to an empty string as not specified
Fix #355
2016-07-06 13:30:54 +02:00
Jan Nicklas 8fbbf69e50 Update dependencies 2016-07-02 12:51:07 +02:00
Jan Nicklas 86badc3d6e Add documentation for `html-webpack-plugin-alter-asset-tags` 2016-06-10 14:11:01 +02:00
Jan Nicklas c43bb4359f Add 'html-webpack-plugin-alter-asset-tags' 2016-06-10 08:17:41 +02:00
Jan Nicklas c229fcbab2 Add html-webpack-plugin-alter-chunks event 2016-05-30 11:59:17 +02:00
Patrick Burtchaell b718dc1c2c Add type attribute to script element
* Update index.js to add type attribute
* Update tests
* Build examples to update HTML
* Update CHANGELOG
2016-05-13 13:18:58 +02:00
Thomas Grainger 05d6694743 ∃ ∀ hot-update.js for isHotUpdateCompilation 2016-05-13 11:46:15 +02:00
Jan Nicklas 10058066d7 Merge pull request #281 from dtinth/patch-1
Don’t emit the html for hot-update compilation.
2016-04-30 19:53:49 +02:00
Jan Nicklas bfed3a29cc Add support for dynamic filenames 2016-04-18 13:00:48 +02:00
Jan Nicklas c0b730f25d Support hashes in filenames 2016-04-18 13:00:48 +02:00
Thai Pangsakulyanont 25fd764e16 Don’t emit the html for hot-update compilation.
webpack-dev-server@2.0.0-beta seems to be emitting hot update bundles separately from the full bundle. This makes HtmlWebpackPlugin mistake it for the real bundle, and generates a HTML file that looks like this:

```html
<script src="0.8f9c33574d86dd9eab0d.hot-update.js"></scriptt>
```

This commit uses quite a hack to check if the emitted bundle is a hot-update bundle, and skip emitting `index.html` file.
2016-04-02 16:47:06 +07:00
Jan Nicklas f616f2e22f Add inlining 2016-03-23 10:07:26 +01:00
Jan Nicklas a04434a225 Add unit tests for absolute file names 2016-03-23 09:20:34 +01:00
Evan You e4e9555209 support absolute filenames 2016-03-23 03:08:46 -04:00
Jan Nicklas 67ca550b99 Merge pull request #249 from sandeep45/master
build public path with correct hash value
2016-03-17 07:04:33 +01:00
Koen Punt bf5901e5c0 Add xhtml option to make link tags self-closing 2016-03-15 12:37:18 +01:00
Sandeep Arneja 419c2e6121 build public path with correct hash value 2016-03-09 17:45:42 -05:00
Michael Wolfenden 3005cec0f9 Add additional compilation property to the templateParam object 2016-03-02 13:28:26 +10:00
Simen Bekkhus 3897896265 Add before-html-generation event
This allows you to add assets to the html when not using
injection
2016-02-27 18:28:41 +01:00
Ma Cheng 0b4d7383ea Add chunk hash to `assets.chunks`
Add chunk hash to `assets.chunks` so can use it in template.
For some version control requirements, chunk hash may be more useful than compilation hash.
For example, if there are two chunks in page, but only one of them is changed, chunk hash is more cache-friendly.
2016-02-23 19:09:18 +08:00
Jan Nicklas 713643f84f v2.9.0 Fix favicon path (#185 #208 #215) 2016-02-17 13:17:23 +01:00
Jiri Kolarik b65c39c2f1 fix favicon location 2016-02-17 13:14:31 +01:00
Jan Nicklas 63e4ad6fc7 Support relative urls on windows (#205) 2016-02-16 08:05:15 +01:00
Jan Nicklas 99a8d7e4fd v2.8.1: Improve caching - fixes #204 2016-02-03 18:03:22 +01:00
Jan Nicklas 3f38901758 v2.8.0: Add chunk sort mode dependency 2016-02-03 18:00:27 +01:00
Christian Ruehl 36c762a834 ChunkSorter now implements all different strategies for sorting chunks available through chunksSortMode parameter. HtmlPlugin rewritten to use extended ChunkSorter. 2016-01-26 20:28:02 +01:00
Christian Rühl 3fedf6ac33 Implemented new chunk sorting mode 'dependency', which attempts to order chunks based on their relation within the dependency tree as devised by Webpack.
Added unit test for new sorting mode.

Fixed a few typos in other unit tests...sorry, couldn't resist ;-)
2016-01-25 15:13:19 +01:00
Jan Nicklas 70df65d9e5 Add support for require in js templates 2016-01-24 19:07:09 +01:00
Jan Nicklas 8eb8c86be4 Fix relative windows path 2016-01-20 16:51:07 +01:00
Jan Nicklas bf48112fa9 Use semistandard code style 2016-01-20 16:50:16 +01:00
Jan Nicklas d5c4e08457 Minor refactoring because of #179
Release 2.6.5
2016-01-19 14:52:25 +01:00
Jan Nicklas e566dac40d Fix context 2016-01-18 14:47:54 +01:00
Jan Nicklas df2e4728ab Fix default template name 2016-01-18 14:47:26 +01:00