bugfix renaming of function
This commit is contained in:
parent
42c319702a
commit
78f2307982
3 changed files with 6 additions and 5 deletions
|
@ -88,7 +88,7 @@ function conditionallyAddPWA() {
|
|||
return head;
|
||||
}
|
||||
|
||||
function buildBasicOgMetadataAndPWA() {
|
||||
function buildHead() {
|
||||
const head = '<!-- VARIABLE_HEAD_BEGIN -->' + conditionallyAddPWA() + buildOgMetadata() + '<!-- VARIABLE_HEAD_END -->';
|
||||
return head;
|
||||
}
|
||||
|
@ -312,8 +312,8 @@ async function getHtml(ctx) {
|
|||
}
|
||||
}
|
||||
|
||||
const ogMetadata = buildBasicOgMetadata();
|
||||
const ogMetadata = buildHead();
|
||||
return insertToHead(html, ogMetadata);
|
||||
}
|
||||
|
||||
module.exports = { insertToHead, buildBasicOgMetadataAndPWA, getHtml };
|
||||
module.exports = { insertToHead, buildHead, getHtml };
|
||||
|
|
|
@ -31,4 +31,5 @@ router.get('*', async ctx => {
|
|||
ctx.body = html;
|
||||
});
|
||||
|
||||
|
||||
module.exports = router;
|
||||
|
|
|
@ -8,7 +8,7 @@ const WriteFilePlugin = require('write-file-webpack-plugin');
|
|||
const { DefinePlugin, ProvidePlugin } = require('webpack');
|
||||
const SentryWebpackPlugin = require('@sentry/webpack-plugin');
|
||||
const { getJsBundleId } = require('./bundle-id.js');
|
||||
const { insertToHead, buildBasicOgMetadataAndPWA } = require('./src/html');
|
||||
const { insertToHead, buildHead } = require('./src/html');
|
||||
const { insertVariableXml, getOpenSearchXml } = require('./src/xml');
|
||||
|
||||
const CUSTOM_ROOT = path.resolve(__dirname, '../custom/');
|
||||
|
@ -27,7 +27,7 @@ const copyWebpackCommands = [
|
|||
to: `${DIST_ROOT}/index.html`,
|
||||
// add javascript script to index.html, generate/insert metatags
|
||||
transform(content, path) {
|
||||
return insertToHead(content.toString(), buildBasicOgMetadataAndPWA());
|
||||
return insertToHead(content.toString(), buildHead());
|
||||
},
|
||||
force: true,
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue