From d6c89f88b0b0bbed519d37252b31de5d8bc20dde Mon Sep 17 00:00:00 2001 From: Lars Trieloff Date: Tue, 30 Apr 2019 09:11:45 +0000 Subject: [PATCH] fix(static): use .url instead of .esi as extension for immutable resources See https://github.com/adobe/helix-publish/pull/61/commits/403ae1bf4ce0cf5cada48b5eae7b4cc730551aa9 --- static.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static.js b/static.js index 893138c1..ff060124 100644 --- a/static.js +++ b/static.js @@ -116,7 +116,7 @@ function rewriteCSS(css, base = '') { if (importuri.reference === 'relative' && !importuri.query) { rule.replaceWith(postcss.atRule({ name: 'import', - params: `url(${quote}${importuri.path}${quote}) ${queries}`, + params: `url(${quote}${importuri.path}${quote}) ${queries}`, })); } } else if (parsedurl.nodes @@ -128,7 +128,7 @@ function rewriteCSS(css, base = '') { if (importuri.reference === 'relative' && !importuri.query) { rule.replaceWith(postcss.atRule({ name: 'import', - params: `${quote}${importuri.path}${quote} ${queries}`, + params: `${quote}${importuri.path}${quote} ${queries}`, })); } } @@ -144,7 +144,7 @@ function rewriteCSS(css, base = '') { url: (asset) => { // TODO pass in request URL and make it absolute. if (asset.search === '' && asset.absolutePath !== '.' && asset.relativePath !== '.') { - return `${asset.relativePath}`; + return `${asset.relativePath}`; } return asset.url; }, @@ -170,7 +170,7 @@ function rewriteJavaScript(javascript, base = '') { const { specifiers } = path.node; // console.log(srcuri); const h = ohash(srcuri.path); - importmap[h] = `${path.node.source.value}`; + importmap[h] = `${path.node.source.value}`; path.replaceWith(t.importDeclaration(specifiers, t.stringLiteral(h))); } }