-
-
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)
* chore: Updating webpack-dev-server (#1646) * test: Misc changes to test suite * refactor: Updating prerender-provider * fix: Temp(?) workaround for Critters not deduping styles * test: Updating tests * docs: Adding changeset * fix: Bumping critters * junk: Debugging CI * chore: Bumping critters-webpack * ci: Fixing PnP test action * chore: Bumping critters * test: Updating custom-template tests * test: Updating sourcemap file size comparision * test: Custom assertion as key matching was difficult to debug
- Loading branch information
1 parent
e98994a
commit c6e57ca
Showing
20 changed files
with
494 additions
and
1,038 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
Oops, something went wrong.