PR-420915: Changing the logic for aliases for one source of truth on tsconfig.json and updating packages.

This commit is contained in:
2023-02-21 00:10:34 +00:00
parent 176636ea6b
commit 0bbe080ea0
15 changed files with 1279 additions and 1154 deletions

View File

@ -6,10 +6,12 @@ import MiniCssExtractPlugin from 'mini-css-extract-plugin';
import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';
import ESLintPlugin from 'eslint-webpack-plugin';
import CopyPlugin from 'copy-webpack-plugin';
import { resolveTsAliases } from "resolve-ts-aliases";
const ROOT_DIR = path.resolve(__dirname);
const resolvePath = (...args: string[]) => path.resolve(ROOT_DIR, ...args);
const BUILD_DIR = resolvePath('build');
const alias = resolveTsAliases(path.resolve("tsconfig.json"));
const copyPatterns = [
{
@ -41,11 +43,7 @@ const config: Configuration = {
},
resolve: {
extensions: ['.js', '.jsx','.ts','.tsx', '.json'],
alias: {
'@components': path.resolve(__dirname, '../src/frontend/components/'),
'@styles': path.resolve(__dirname, '../src/frontend/styles/'),
'@config': path.resolve(__dirname, '../config/'),
},
alias,
},
devtool: 'inline-source-map',
mode: 'development',