From c5b8382ad540ea7d8b6c6c4c03a534586ea9d78c Mon Sep 17 00:00:00 2001 From: Kees Kluskens Date: Sun, 29 Jan 2017 11:28:13 +0100 Subject: [PATCH] Remove `text/javascript` from all script tags --- examples/appcache/dist/webpack-1/index.html | 2 +- examples/appcache/dist/webpack-2/index.html | 2 +- .../custom-template/dist/webpack-1/index.html | 2 +- .../custom-template/dist/webpack-2/index.html | 2 +- examples/default/dist/webpack-1/index.html | 2 +- examples/default/dist/webpack-2/index.html | 2 +- examples/favicon/dist/webpack-1/favicon.html | 2 +- examples/favicon/dist/webpack-2/favicon.html | 2 +- .../html-loader/dist/webpack-1/about.html | 2 +- .../html-loader/dist/webpack-1/index.html | 2 +- .../html-loader/dist/webpack-2/about.html | 2 +- .../html-loader/dist/webpack-2/index.html | 2 +- examples/inline/dist/webpack-1/index.html | 2 +- examples/inline/dist/webpack-2/index.html | 2 +- examples/inline/template.jade | 2 +- .../jade-loader/dist/webpack-1/index.html | 2 +- .../jade-loader/dist/webpack-2/index.html | 2 +- .../dist/webpack-1/index.html | 2 +- .../dist/webpack-2/index.html | 2 +- examples/javascript/dist/webpack-1/index.html | 2 +- examples/javascript/dist/webpack-2/index.html | 2 +- index.js | 1 - spec/BasicSpec.js | 82 +++++++++---------- spec/ExampleSpec.js | 4 + spec/fixtures/invalid.html | 2 +- spec/fixtures/legacy.html | 2 +- spec/fixtures/template.jade | 2 +- spec/fixtures/test.html | 2 +- spec/fixtures/webpackconfig.html | 2 +- 29 files changed, 71 insertions(+), 68 deletions(-) diff --git a/examples/appcache/dist/webpack-1/index.html b/examples/appcache/dist/webpack-1/index.html index 9cf3475..648a652 100644 --- a/examples/appcache/dist/webpack-1/index.html +++ b/examples/appcache/dist/webpack-1/index.html @@ -7,5 +7,5 @@ - + \ No newline at end of file diff --git a/examples/appcache/dist/webpack-2/index.html b/examples/appcache/dist/webpack-2/index.html index 9cf3475..648a652 100644 --- a/examples/appcache/dist/webpack-2/index.html +++ b/examples/appcache/dist/webpack-2/index.html @@ -7,5 +7,5 @@ - + \ No newline at end of file diff --git a/examples/custom-template/dist/webpack-1/index.html b/examples/custom-template/dist/webpack-1/index.html index 1ceade2..a9d8bf4 100644 --- a/examples/custom-template/dist/webpack-1/index.html +++ b/examples/custom-template/dist/webpack-1/index.html @@ -8,5 +8,5 @@

Partial

- + \ No newline at end of file diff --git a/examples/custom-template/dist/webpack-2/index.html b/examples/custom-template/dist/webpack-2/index.html index 1ceade2..a9d8bf4 100644 --- a/examples/custom-template/dist/webpack-2/index.html +++ b/examples/custom-template/dist/webpack-2/index.html @@ -8,5 +8,5 @@

Partial

- + \ No newline at end of file diff --git a/examples/default/dist/webpack-1/index.html b/examples/default/dist/webpack-1/index.html index 866dfa4..8a7f3ef 100644 --- a/examples/default/dist/webpack-1/index.html +++ b/examples/default/dist/webpack-1/index.html @@ -5,5 +5,5 @@ Webpack App - + \ No newline at end of file diff --git a/examples/default/dist/webpack-2/index.html b/examples/default/dist/webpack-2/index.html index 866dfa4..8a7f3ef 100644 --- a/examples/default/dist/webpack-2/index.html +++ b/examples/default/dist/webpack-2/index.html @@ -5,5 +5,5 @@ Webpack App - + \ No newline at end of file diff --git a/examples/favicon/dist/webpack-1/favicon.html b/examples/favicon/dist/webpack-1/favicon.html index dd7daeb..7276322 100644 --- a/examples/favicon/dist/webpack-1/favicon.html +++ b/examples/favicon/dist/webpack-1/favicon.html @@ -5,5 +5,5 @@ HtmlWebpackPlugin example - + \ No newline at end of file diff --git a/examples/favicon/dist/webpack-2/favicon.html b/examples/favicon/dist/webpack-2/favicon.html index dd7daeb..7276322 100644 --- a/examples/favicon/dist/webpack-2/favicon.html +++ b/examples/favicon/dist/webpack-2/favicon.html @@ -5,5 +5,5 @@ HtmlWebpackPlugin example - + \ No newline at end of file diff --git a/examples/html-loader/dist/webpack-1/about.html b/examples/html-loader/dist/webpack-1/about.html index 68c0cab..5689f88 100644 --- a/examples/html-loader/dist/webpack-1/about.html +++ b/examples/html-loader/dist/webpack-1/about.html @@ -7,5 +7,5 @@ - + \ No newline at end of file diff --git a/examples/html-loader/dist/webpack-1/index.html b/examples/html-loader/dist/webpack-1/index.html index 68c0cab..5689f88 100644 --- a/examples/html-loader/dist/webpack-1/index.html +++ b/examples/html-loader/dist/webpack-1/index.html @@ -7,5 +7,5 @@ - + \ No newline at end of file diff --git a/examples/html-loader/dist/webpack-2/about.html b/examples/html-loader/dist/webpack-2/about.html index 68c0cab..5689f88 100644 --- a/examples/html-loader/dist/webpack-2/about.html +++ b/examples/html-loader/dist/webpack-2/about.html @@ -7,5 +7,5 @@ - + \ No newline at end of file diff --git a/examples/html-loader/dist/webpack-2/index.html b/examples/html-loader/dist/webpack-2/index.html index 68c0cab..5689f88 100644 --- a/examples/html-loader/dist/webpack-2/index.html +++ b/examples/html-loader/dist/webpack-2/index.html @@ -7,5 +7,5 @@ - + \ No newline at end of file diff --git a/examples/inline/dist/webpack-1/index.html b/examples/inline/dist/webpack-1/index.html index bd1cda3..eb56c5e 100644 --- a/examples/inline/dist/webpack-1/index.html +++ b/examples/inline/dist/webpack-1/index.html @@ -1,6 +1,6 @@ Jade demo \ No newline at end of file +Jade demo
Current time

1998-12-31T23:00:00.000Z

\ No newline at end of file diff --git a/examples/jade-loader/dist/webpack-2/index.html b/examples/jade-loader/dist/webpack-2/index.html index f1821b3..e720b25 100644 --- a/examples/jade-loader/dist/webpack-2/index.html +++ b/examples/jade-loader/dist/webpack-2/index.html @@ -1 +1 @@ -Jade demo
Current time

1998-12-31T23:00:00.000Z

\ No newline at end of file +Jade demo
Current time

1998-12-31T23:00:00.000Z

\ No newline at end of file diff --git a/examples/javascript-advanced/dist/webpack-1/index.html b/examples/javascript-advanced/dist/webpack-1/index.html index 61d6408..194f6fb 100644 --- a/examples/javascript-advanced/dist/webpack-1/index.html +++ b/examples/javascript-advanced/dist/webpack-1/index.html @@ -1,2 +1,2 @@ Webpack AppHello World from backend -

Partial

- \ No newline at end of file + \ No newline at end of file diff --git a/examples/javascript-advanced/dist/webpack-2/index.html b/examples/javascript-advanced/dist/webpack-2/index.html index 61d6408..194f6fb 100644 --- a/examples/javascript-advanced/dist/webpack-2/index.html +++ b/examples/javascript-advanced/dist/webpack-2/index.html @@ -1,2 +1,2 @@ Webpack AppHello World from backend -

Partial

- \ No newline at end of file + \ No newline at end of file diff --git a/examples/javascript/dist/webpack-1/index.html b/examples/javascript/dist/webpack-1/index.html index 0ab3bbd..b6d4333 100644 --- a/examples/javascript/dist/webpack-1/index.html +++ b/examples/javascript/dist/webpack-1/index.html @@ -1,2 +1,2 @@ Hello World from backend2016-10-29T07:02:05.646Z

Partial

- \ No newline at end of file + \ No newline at end of file diff --git a/examples/javascript/dist/webpack-2/index.html b/examples/javascript/dist/webpack-2/index.html index 299dba1..44306df 100644 --- a/examples/javascript/dist/webpack-2/index.html +++ b/examples/javascript/dist/webpack-2/index.html @@ -1,2 +1,2 @@ Hello World from backend2016-07-02T10:27:15.263Z

Partial

- \ No newline at end of file + \ No newline at end of file diff --git a/index.js b/index.js index be5eb0e..66f5dbb 100644 --- a/index.js +++ b/index.js @@ -462,7 +462,6 @@ HtmlWebpackPlugin.prototype.generateAssetTags = function (assets) { // Turn script files into script tags var scripts = assets.js.map(function (scriptPath) { return htmlTag.createHtmlTagObject('script', { - type: 'text/javascript', src: scriptPath }); }); diff --git a/spec/BasicSpec.js b/spec/BasicSpec.js index 92aef9b..4a46d3a 100644 --- a/spec/BasicSpec.js +++ b/spec/BasicSpec.js @@ -100,7 +100,7 @@ describe('HtmlWebpackPlugin', function () { filename: 'index_bundle.js' }, plugins: [new HtmlWebpackPlugin()] - }, [/[\s]* + diff --git a/spec/fixtures/legacy.html b/spec/fixtures/legacy.html index 91cb157..f7473d1 100644 --- a/spec/fixtures/legacy.html +++ b/spec/fixtures/legacy.html @@ -6,6 +6,6 @@

Some unique text

- + diff --git a/spec/fixtures/template.jade b/spec/fixtures/template.jade index 39aa1a9..5f56e94 100644 --- a/spec/fixtures/template.jade +++ b/spec/fixtures/template.jade @@ -6,4 +6,4 @@ html body p Some unique text each jsFile in htmlWebpackPlugin.files.js - script(type="text/javascript" src!=jsFile) + script(src!=jsFile) diff --git a/spec/fixtures/test.html b/spec/fixtures/test.html index fa8a9ec..78d0485 100644 --- a/spec/fixtures/test.html +++ b/spec/fixtures/test.html @@ -6,6 +6,6 @@

Some unique text

- + diff --git a/spec/fixtures/webpackconfig.html b/spec/fixtures/webpackconfig.html index 3359eb7..31d8cb6 100644 --- a/spec/fixtures/webpackconfig.html +++ b/spec/fixtures/webpackconfig.html @@ -6,6 +6,6 @@

Public path is <%= webpackConfig.output.publicPath %>

- +