-
-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: Updating html-webpack-plugin to v4 (#1608)
- Loading branch information
1 parent
3f389c2
commit 90d4596
Showing
11 changed files
with
302 additions
and
885 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'preact-cli': minor | ||
'@preact/prerender-data-provider': patch | ||
--- | ||
|
||
Updates to use html-webpack-plugin v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<%= htmlWebpackPlugin.options.ssr() %> | ||
<% if (htmlWebpackPlugin.options.config.prerender === true) { %> | ||
<%= cli.ssr %> | ||
<% if (cli.config.prerender === true) { %> | ||
<script type="__PREACT_CLI_DATA__"> | ||
<%= encodeURI(JSON.stringify(htmlWebpackPlugin.options.CLI_DATA)) %> | ||
<%= encodeURI(JSON.stringify(cli.CLI_DATA)) %> | ||
</script> | ||
<% } %> | ||
<% if (webpack.assets.filter(entry => entry.name.match(/bundle(\.\w{5})?.esm.js$/)).length > 0) { %> | ||
<script crossorigin="anonymous" src="<%= htmlWebpackPlugin.files.publicPath %><%= webpack.assets.filter(entry => entry.name.match(/bundle(\.\w{5})?.esm.js$/))[0].name %>" type="module"></script> | ||
<% if (htmlWebpackPlugin.files.js.filter(entry => entry.match(/bundle(\.\w{5})?.esm.js$/)).length > 0) { %> | ||
<script crossorigin="anonymous" src="<%= htmlWebpackPlugin.files.js.filter(entry => entry.match(/bundle(\.\w{5})?.esm.js$/))[0] %>" type="module"></script> | ||
<% | ||
/*Fetch and Promise polyfills are not needed for browsers that support type=module | ||
Please re-evaluate below line if adding more polyfills.*/ | ||
%> | ||
<script nomodule src="<%= htmlWebpackPlugin.files.chunks["polyfills"].entry %>"></script> | ||
<script nomodule defer src="<%= htmlWebpackPlugin.files.chunks['bundle'].entry %>"></script> | ||
<script nomodule src="<%= cli.entrypoints['polyfills'] %>"></script> | ||
<script nomodule defer src="<%= cli.entrypoints['bundle'] %>"></script> | ||
<% } else { %> | ||
<script <%= htmlWebpackPlugin.options.scriptLoading %> src="<%= htmlWebpackPlugin.files.chunks['bundle'].entry %>"></script> | ||
<script nomodule src="<%= htmlWebpackPlugin.files.chunks["polyfills"].entry %>"></script> | ||
<script <%= htmlWebpackPlugin.options.scriptLoading %> src="<%= cli.entrypoints['bundle'] %>"></script> | ||
<script nomodule src="<%= cli.entrypoints['polyfills'] %>"></script> | ||
<% } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.