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;
|
return head;
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildBasicOgMetadataAndPWA() {
|
function buildHead() {
|
||||||
const head = '<!-- VARIABLE_HEAD_BEGIN -->' + conditionallyAddPWA() + buildOgMetadata() + '<!-- VARIABLE_HEAD_END -->';
|
const head = '<!-- VARIABLE_HEAD_BEGIN -->' + conditionallyAddPWA() + buildOgMetadata() + '<!-- VARIABLE_HEAD_END -->';
|
||||||
return head;
|
return head;
|
||||||
}
|
}
|
||||||
|
@ -312,8 +312,8 @@ async function getHtml(ctx) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const ogMetadata = buildBasicOgMetadata();
|
const ogMetadata = buildHead();
|
||||||
return insertToHead(html, ogMetadata);
|
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;
|
ctx.body = html;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
|
|
|
@ -8,7 +8,7 @@ const WriteFilePlugin = require('write-file-webpack-plugin');
|
||||||
const { DefinePlugin, ProvidePlugin } = require('webpack');
|
const { DefinePlugin, ProvidePlugin } = require('webpack');
|
||||||
const SentryWebpackPlugin = require('@sentry/webpack-plugin');
|
const SentryWebpackPlugin = require('@sentry/webpack-plugin');
|
||||||
const { getJsBundleId } = require('./bundle-id.js');
|
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 { insertVariableXml, getOpenSearchXml } = require('./src/xml');
|
||||||
|
|
||||||
const CUSTOM_ROOT = path.resolve(__dirname, '../custom/');
|
const CUSTOM_ROOT = path.resolve(__dirname, '../custom/');
|
||||||
|
@ -27,7 +27,7 @@ const copyWebpackCommands = [
|
||||||
to: `${DIST_ROOT}/index.html`,
|
to: `${DIST_ROOT}/index.html`,
|
||||||
// add javascript script to index.html, generate/insert metatags
|
// add javascript script to index.html, generate/insert metatags
|
||||||
transform(content, path) {
|
transform(content, path) {
|
||||||
return insertToHead(content.toString(), buildBasicOgMetadataAndPWA());
|
return insertToHead(content.toString(), buildHead());
|
||||||
},
|
},
|
||||||
force: true,
|
force: true,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue