Skip to content

Commit

Permalink
Update Eta version and add rmWhitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
nebrelbug committed Apr 28, 2020
1 parent bd3dded commit c85ddcd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/docusaurus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"core-js": "^2.6.5",
"css-loader": "^3.4.2",
"del": "^5.1.0",
"eta": "^1.1.0",
"eta": "^1.1.1",
"express": "^4.17.1",
"fs-extra": "^8.1.0",
"globby": "^10.0.1",
Expand Down
6 changes: 2 additions & 4 deletions packages/docusaurus/src/client/serverEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,7 @@ export default async function render(locals) {
const {baseUrl} = locals;

const renderedHtml = eta.render(
ssrTemplate
.trim()
.replace(/[\r\n]+/g, '\n')
.replace(/^\s+|\s+$/gm, ''),
ssrTemplate.trim(),
{
appHtml,
baseUrl,
Expand All @@ -81,6 +78,7 @@ export default async function render(locals) {
},
{
name: 'ssr-template',
rmWhitespace: true
},
);

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6700,10 +6700,10 @@ esutils@^2.0.2:
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==

eta@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/eta/-/eta-1.1.0.tgz#e43c1aa6ea1d727b59c75e928a19a7e3019efb88"
integrity sha512-uRJ5adkcETpARCpAkN56t13AjZePSA99A/OgNwSdc/wCthr8l+uEcvbx53R4rutwmfSBlF6VOYq7vXgooqVJNQ==
eta@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/eta/-/eta-1.1.1.tgz#acd575025233488a66870b02223001d4cd467441"
integrity sha512-YRchTAXZZrrJVmlAwmLHuKmlHNJ2hO0uen8LsDqvH5kknRjh0ef+Y9kInENygCgvu7FQNJBpbyDChfMo8f5Qgw==

etag@~1.8.1:
version "1.8.1"
Expand Down

0 comments on commit c85ddcd

Please sign in to comment.