Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ner-portal-programs into mashal-m/react-upgrade-to-v17
  • Loading branch information
mashal-m committed Jul 25, 2023
2 parents ae1be32 + 1c78589 commit e7c5b48
Show file tree
Hide file tree
Showing 5 changed files with 17,339 additions and 28,243 deletions.
1 change: 1 addition & 0 deletions env.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
11 changes: 11 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// eg.
// $ ACTIVE_ENV=<env_name> npm run build
const activeEnv = process.env.ACTIVE_ENV || process.env.NODE_ENV || 'development';
const path = require('path');

require('dotenv').config({
path: `.env.${activeEnv}`,
Expand All @@ -19,6 +20,16 @@ if (process.env.UNBRANDED_LANDING_PAGE === 'True') {
module.exports = {
pathPrefix: `${process.env.ENABLE_PATH_PREFIX ? process.env.HOSTNAME : '/'}`,
plugins: [
{
resolve: 'gatsby-plugin-alias-imports',
options: {
alias: {
'env.config': path.join(__dirname, './env.config.js'),
},

extensions: ['.js', '.jsx'],
},
},
{
resolve: '@edx/gatsby-source-portal-designer',
options: {
Expand Down
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
const path = require('path');

const envConfigPath = path.join(__dirname, 'env.config.js');
module.exports = {
transform: {
'^.+\\.jsx?$': '<rootDir>/jest-preprocess.js',
},
moduleNameMapper: {
'.+\\.(css|styl|less|sass|scss)$': 'identity-obj-proxy',
'.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/fileTransformer.js',
'env.config': envConfigPath,
},
testPathIgnorePatterns: ['node_modules', '.cache'],
transformIgnorePatterns: ['node_modules/(?!(gatsby|@edx/paragon|@edx/frontend-platform|@edx/frontend-component-footer-edx))'],
Expand Down
Loading

0 comments on commit e7c5b48

Please sign in to comment.