Commit Graph

92 Commits

Author SHA1 Message Date
Jan Nicklas ec36061b03 Allow to disable sorting or pass a custom sort function 2015-11-23 12:04:42 +01:00
Jan Nicklas 5305da7b15 Port "Don't insert chunks that is not 'initial'" 2015-11-23 11:48:28 +01:00
Jan Nicklas 6f522b1998 Beta release 2.0.4 2015-10-08 21:46:39 +02:00
Arthur Stolyar 5db310fa02 Eliminate redundant try..catch 2015-10-04 17:39:02 +03:00
Arthur Stolyar a34a2b0e24 Fix minify option 2015-10-04 16:03:42 +03:00
Kees Kluskens a4c18b8c30 Remove url formatting in publicPath. 2015-09-29 21:35:09 +02:00
Kees Kluskens 3f55437bfb Another try at fixing the public path. 2015-09-28 23:48:54 +02:00
Jan Nicklas bba8e6bdf6 Fix public path 2015-09-23 12:38:22 +02:00
Kees Kluskens 9278bee55b Merge branch 'master' into feature-loaders-doc
# Conflicts:
#	index.js
#	spec/HtmlWebpackPluginSpec.js
2015-09-20 17:54:35 +02:00
Jan Nicklas eed82ed886 A try to explain the replace statement 2015-09-18 13:29:48 +02:00
Kees Kluskens 71dfeab599 Use unique variable to replace the source result. 2015-09-18 12:16:02 +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
Kees Kluskens fcecadb5ee Add support for webpack.BannerPlugin 2015-09-09 13:28:10 +02:00
Jan Nicklas f16dc48025 Fix minify and head injection 2015-09-09 11:46:22 +02:00
Kees Kluskens 668ab7ffb3 Bring back template path regex.
This is untested code!
2015-09-09 11:38:25 +02:00
Kees Kluskens 0ede95051b Remove manifest option again and update test. 2015-09-09 11:38:25 +02:00
Kees Kluskens 648fd72c22 Fix manifest option and add tests. 2015-09-09 11:38:24 +02:00
Kees Kluskens 989a09f97a Add loader tests and cleanup redundant code. 2015-09-09 11:38:24 +02:00
Kees Kluskens 55fcb6d939 Fix displaying loader errors. 2015-09-09 11:38:24 +02:00
Simen Bekkhus d3eed761f7 Return minified html from promise 2015-09-09 11:38:24 +02:00
Jan Nicklas ef42642f34 Add jade-loader example 2015-09-09 11:38:24 +02:00
Jan Nicklas 54002dd271 Add more verbose syntax error messages 2015-09-09 11:38:23 +02:00
Jan Nicklas b0af6a3d42 More verbose error messages 2015-09-09 11:38:23 +02:00
Jan Nicklas 387ca2448a Use lodash to solve dependency issues for the fallback loader 2015-09-09 11:38:07 +02:00
Jan Nicklas 931ed64467 Fix correct autoloading 2015-09-09 11:38:07 +02:00
Jan Nicklas 02223b29e5 Use blueimp loader instead of blueimp 2015-09-09 11:38:07 +02:00
Jan Nicklas 181b026946 Fix webpack-dev-server child compilation on template change 2015-09-09 11:38:06 +02:00
Jan Nicklas ed8f61fc69 Fix chunk filtering 2015-09-09 11:38:06 +02:00
Jan Nicklas e52bf5e2f3 Refactor template loading 2015-09-09 11:38:06 +02:00
Kenny Tran c7225f7abb Fix typo 2015-09-09 11:38:06 +02:00
Jan Nicklas f1d3d95af6 Move compilation into a new function 2015-09-09 11:38:06 +02:00
Jan Nicklas ed8e4b290f Fix to resolve path of modules 2015-09-09 11:38:06 +02:00
Jan Nicklas d82bd52e2f Add minification again 2015-09-09 11:38:06 +02:00
Jan Nicklas c8a69255b9 Refactoring to support loaders 2015-09-09 11:38:06 +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
Tom Robinson 562acca036 Fixes stylesheet <links> being discarded when used with "inject: 'head'". 2015-07-29 11:23:10 -07: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 55b530ba3f Support placing templates in subfolders 2015-06-29 15:57:18 +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
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 73a61a94e9 More verbose warning 2015-06-09 09:42:20 +02:00
Jan Nicklas 6219714fc7 Allow to inject javascript files into the head of the html page 2015-06-01 11:19:45 +02:00
Chris e5a210c60d Change assets deprecation from error to warning 2015-05-26 13:07:30 +01: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
Kenny Tran d861441014 Update index.js 2015-05-19 08:04:02 -07:00