Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openedx/frontend-build
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v14.4.0
Choose a base ref
...
head repository: openedx/frontend-build
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v14.4.1
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Mar 28, 2025

  1. Copy the full SHA
    3c80898 View commit details
Showing with 12 additions and 5 deletions.
  1. +10 −3 config/webpack.common.config.js
  2. +1 −1 example/src/index.tsx
  3. +1 −1 example/tsconfig.json
13 changes: 10 additions & 3 deletions config/webpack.common.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const fs = require('fs');
const path = require('path');
const RemoveEmptyScriptsPlugin = require('webpack-remove-empty-scripts');
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
@@ -12,6 +13,14 @@ const {
const paragonThemeCss = getParagonThemeCss(process.cwd());
const brandThemeCss = getParagonThemeCss(process.cwd(), { isBrandOverride: true });

const tsconfigPath = path.resolve(process.cwd(), 'tsconfig.json');
const resolvePlugins = [];

// Conditionally add TsconfigPathsPlugin if tsconfig.json exists
if (fs.existsSync(tsconfigPath)) {
resolvePlugins.push(new TsconfigPathsPlugin({ configFile: tsconfigPath }));
}

module.exports = {
entry: {
app: path.resolve(process.cwd(), './src/index'),
@@ -46,9 +55,7 @@ module.exports = {
'env.config': false,
},
extensions: ['.js', '.jsx', '.ts', '.tsx'],
plugins: [
new TsconfigPathsPlugin(),
],
plugins: resolvePlugins,
},
optimization: {
splitChunks: {
2 changes: 1 addition & 1 deletion example/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import App from '@/App';
import App from '@src/App';

// This line is to emulate what frontend-platform does when i18n initializes.
// It's necessary because our stylesheet is generated with `[dir="ltr"]` as a prefix on all
2 changes: 1 addition & 1 deletion example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"rootDir": ".",
"outDir": "dist",
"paths": {
"@/*": ["./src/*"]
"@src/*": ["./src/*"]
},
},
"include": [