Skip to content

Commit

Permalink
feat: Add cohesion config to htmlWebpackPlugin options
Browse files Browse the repository at this point in the history
  • Loading branch information
julianajlk committed Oct 17, 2024
1 parent 8e605c4 commit 1a22a2b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
38 changes: 38 additions & 0 deletions cohesion.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
const cohesionConfig = {
name: 'edx',
slug: 'edx',
domain: 'edx.org',
domainLabel: 'edx',
domainExtension: '.org',
domainLabelWithExtension: 'edx.org',
postTypeGql: '',
homepageGql: '',
siteUrl: 'https://www.edx.org',
cmsUrl: process.env.NEXT_PUBLIC_WORDPRESS_URL || '',
cmsUser: process.env.WP_USER || '',
cmsPwd: process.env.WP_PWD || '',
logoUrl: '',
studyMatchUrl: '',
voyagerUrl: '/discover',
identityToken: '',
gaCid: '',
gaSid: '',
gaMid: '',
defaultDegree: '',
defaultCategory: '',
defaultSubject: '',
tagularApiKey: '',
tagularSourceKey: 'src_2euJfAVNt6Z9kQz4e9t1SQBtm8x',
tagularWriteKey: 'wk_2euJfDkJVTtEVzsC8BPOb0g9dVj',
tagularCookieDomain: 'edx.org',
tagularDomainWhitelist: JSON.stringify([
'edx.org',
]),
monarchSourceId: '',
monarchToken: '',
newRelicAppID: '',
newRelicVoyagerAppID: '',
cookieLawId: '',
};

module.exports = cohesionConfig;
3 changes: 3 additions & 0 deletions webpack.prod.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const { getBaseConfig } = require('@openedx/frontend-build');
*/

const config = getBaseConfig('webpack-prod');
// eslint-disable-next-line import/extensions
const cohesionConfig = require('./cohesion.config.js');

/* eslint-disable no-param-reassign */
config.plugins.forEach((plugin) => {
Expand All @@ -29,6 +31,7 @@ config.plugins.forEach((plugin) => {
}

plugin.userOptions.preconnect = preconnectDomains;
plugin.options.cohesionConfig = cohesionConfig;
}
});

Expand Down

0 comments on commit 1a22a2b

Please sign in to comment.