Commit Graph

139 Commits

Author SHA1 Message Date
Jan Nicklas 796bcbe19c Add unit tests for chunk sort 2015-11-23 14:13:32 +01:00
Jan Nicklas c556925234 Work around css-loader issue during testing 2015-11-23 13:38:20 +01:00
Jan Nicklas 2ef2ead8ff Upgrade dependencies 2015-11-23 12:25:17 +01:00
Jan Nicklas 6262921f3f Add missing use strict statements 2015-11-23 12:24:55 +01:00
Jan Nicklas 0b0e0205fc Allow to disable sorting or pass a custom sort function 2015-11-23 12:00:38 +01:00
Jan Nicklas 83ad4de679 Merge pull request #115 from vyorkin/bugfix/skip-async-chunks
Don't insert chunks that is not 'initial'
2015-11-23 11:41:01 +01:00
Vasiliy Yorkin 10e8b5e0a4 Don't insert chunks that is not 'initial' 2015-11-10 21:24:51 +03:00
Jan Nicklas 0a1f3a4464 Release 1.6.2 2015-10-08 21:59:10 +02:00
Jan Nicklas b8b7586717 Merge pull request #92 from thomasguillory/fix/publicPath-hash
FIX missing [hash] interpolation in publicPath
2015-10-04 16:34:38 +02:00
Thomas Guillory 41a255a2f1 FIX missing [hash] interpolation in publicPath
Webpack gives the possibility to use the build [hash] in
output.publicPath option:
https://webpack.github.io/docs/long-term-caching.html

However HtmlWebpackPlugin is reading directly the raw option, preventing the
user to use this option when using it.
2015-10-02 16:13:59 +02:00
Jan Nicklas 273371859b Merge pull request #86 from okhomenko/master
On Windows relative path doesn't work properly
2015-09-15 08:33:10 +02:00
Oleksandr Khomenko 396cdedf8a Wrapped with path.join to fix test on io.js 2015-09-14 17:18:38 -05:00
Oleksandr Khomenko 517dfbac32 Use path.normalize instead of path.join 2015-09-14 17:09:57 -05:00
Oleksandr Khomenko 4809fa5804 Fixed 2 tests on windows.
Resolve web urls properly with node url module
2015-09-14 17:01:04 -05:00
Jan Nicklas 941e8fb7cd Update README.md 2015-09-09 12:09:57 +02:00
Jan Nicklas ba2a590ae4 Add 2.0 installation instructions to readme 2015-09-09 12:07:14 +02:00
Jan Nicklas f68b6e3783 Merge pull request #81 from SimenB/patch-1
Passing true to minify does nothing
2015-08-15 14:04:37 +02:00
Simen Bekkhus 909b811d70 Passing true to minify does nothing
All `html-minifier` options are `false` by default, so passing just true does nothing to the output
2015-08-14 08:59:43 +02:00
Jan Nicklas 95feed96ba Bump version 2015-08-04 17:15:30 +02:00
Jan Nicklas c5d1a8e36e Merge pull request #74 from tlrobinson/master
Fixes stylesheet <link>s being discarded when used with "inject: 'head'"
2015-08-03 23:13:34 +02:00
Tom Robinson 562acca036 Fixes stylesheet <links> being discarded when used with "inject: 'head'". 2015-07-29 11:23:10 -07:00
Jan Nicklas df09669ef5 Merge pull request #70 from mateatslc/master
Bump project dependencies
2015-07-16 16:04:21 +02:00
Mate Olah d2f767176c Bump project dependencies. 2015-07-16 15:43:27 +02:00
Jan Nicklas 89af128acf Merge pull request #69 from shprink/patch-1
Adding the file size to the chunk object
2015-07-13 11:59:23 +02:00
Julien Renaux dfb4f57179 Adding the file size to the chunk object
As far as I know, getting the file size within the template is not possible.

The file size is important in my case in order to have a progress loader via http request so I can do somehting like that:

```
function ajax(url, onProgress, callback, data, x) {
            try {
                x = new(this.XMLHttpRequest || ActiveXObject)('MSXML2.XMLHTTP.3.0');
                x.open(data ? 'POST' : 'GET', url, 1);
                x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
                x.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
                x.onreadystatechange = function() {
                    x.readyState > 3 && callback && callback(x.responseText, x);
                };
                x.addEventListener("progress", onProgress, false);
                x.send(data)
            } catch (e) {
                window.console && console.log(e);
            }
        };

        function onLoad(responseText) {
            var script = document.createElement('script');
            script.setAttribute('type', 'text/javascript');
            if (script.text) {
                script.text = content; // IE
            } else {
                script.appendChild(document.createTextNode(responseText));
            }
            document.getElementsByTagName('head')[0].appendChild(script);
            document.getElementById('appLoader').className = 'finished';
        }

        function onProgress(e) {
            var progress = Math.floor((e.loaded / {%=o.htmlWebpackPlugin.files.chunks.main.size %} || 0) * 100);
            document.getElementById('appLoader').setAttribute("value", progress);
            document.getElementById('appLoaderPercent').innerText = document.createTextNode(progress).textContent;
        }

        ajax('./{%=o.htmlWebpackPlugin.files.chunks.main.entry %}', onProgress, onLoad);
```
2015-07-13 11:43:18 +02:00
Jan Nicklas c630d339c6 Bump version 2015-07-08 11:27:09 +02:00
Jan Nicklas cdd563e5af Merge pull request #66 from cesarandreu/patch-1
Fix example template
2015-06-30 08:57:42 +02:00
Cesar Andreu 7200791f3b Fix example template 2015-06-29 18:30:21 -07:00
Jan Nicklas 55b530ba3f Support placing templates in subfolders 2015-06-29 15:57:18 +02:00
Jan Nicklas 266d8e2325 Merge pull request #62 from oliviertassinari/async
[async] make sure the async chunks aren't included in the html
2015-06-15 23:38:07 +02:00
Olivier Tassinari 0d727cc23e [async] make sure the async chunks aren't included in the html 2015-06-15 20:30:42 +01:00
Jan Nicklas 1f5b357159 Update lodash 2015-06-12 19:02:43 +02:00
Jan Nicklas 284067cc1d Bump version for patch 2015-06-10 23:41:13 +02:00
Jan Nicklas 43aa8a3984 Merge pull request #57 from relayfoods/master
Fix existing manifest regex test
2015-06-10 23:07:45 +02:00
Chip Lay f5842d609e Better <html> regex for minified html strings 2015-06-10 10:06:43 -04:00
Chip Lay 82ef236cb1 Fix existing manifest regex test 2015-06-10 09:27:38 -04:00
Jan Nicklas 50651d946b Update README.md 2015-06-10 14:21:27 +02:00
Jan Nicklas 73a61a94e9 More verbose warning 2015-06-09 09:42:20 +02:00
Jan Nicklas f210b46b84 Extend template example in readme 2015-06-05 09:08:43 +02:00
Jan Nicklas f186c9a0b2 Bump version 2015-06-01 11:25:05 +02:00
Jan Nicklas 92373eea55 Merge pull request #49 from ampedandwired/feature/inject-head
Allow to inject javascript files into the head of the html page
2015-06-01 12:23:54 +03:00
Jan Nicklas 6219714fc7 Allow to inject javascript files into the head of the html page 2015-06-01 11:19:45 +02:00
Jan Nicklas 9036c15b97 Merge pull request #48 from cgreening/patch-1
Change assets deprecation from error to warning
2015-06-01 10:55:58 +03:00
chris.greening 9557db2db0 Modifies unit tests to support expecting warnings 2015-05-31 14:32:07 +01:00
Chris e5a210c60d Change assets deprecation from error to warning 2015-05-26 13:07:30 +01:00
Jan Nicklas 3a834f47bb Merge pull request #46 from SimenB/pretest
Use pretest
2015-05-24 08:45:47 +02:00
Simen Bekkhus 4b9589f55f Use pretest 2015-05-23 19:15:16 +02:00
Jan Nicklas 9d90d37adc Merge pull request #45 from cgreening/patch-1
Fixes error reporting
2015-05-21 19:29:39 +02:00
Chris 8646d911d0 Fixes error reporting
Fixes error reporting so that instead of:

Error in undefined

We get:

Error in HtmlWebPackPlugin: htmlWebpackPlugin.assets is deprecated - please use htmlWebpackPlugin.files instead
2015-05-21 17:35:37 +01:00
Jan Nicklas ae6cfdb090 Merge pull request #43 from kennyt/patch-2
Fix typo in index.js
2015-05-19 21:47:30 +02:00