Skip to content

Commit

Permalink
update webpack with new rule
Browse files Browse the repository at this point in the history
  • Loading branch information
adonispuente committed Sep 17, 2024
1 parent e1b9c6c commit de247e3
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
39 changes: 39 additions & 0 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,45 @@ const pfConfig = {
},
module: {
rules: [
{
test: /\.(js|ts)x?$/,
exclude: /node_modules/,
use: {
loader: 'swc-loader',
options: {
jsc: {
parser: {
syntax: 'typescript',
tsx: true,
},
},
sourceMaps: true,
inlineSources: true,
},
},
},
{
test: /\.(js|ts)x?$/,
include: [
path.resolve(__dirname, '../src/pdf/DownloadButton.tsx'),
path.resolve(__dirname, '../src/components/FavoriteServices/LandingNavFavorites.tsx'),
path.resolve(__dirname, '../src/components/FavoriteServices/DashboardFavorites.tsx'),
],
use: {
loader: 'swc-loader',
options: {
jsc: {
parser: {
syntax: 'typescript',
tsx: true,
},
},
sourceMaps: true,
inlineSources: true,
sourceRoot: path.resolve(__dirname, '../src'), // Adjust sourceRoot for federated modules
},
},
},
{
test: /\.s?[ac]ss$/,
use: [
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"include": ["src/**/*.ts", "**/*.tsx"],
"exclude": ["node_modules", "cypress/**/*.ts", "**/*.cy.tsx"],
// Set `sourceRoot` to "/" to strip the build path prefix from
// generated source code references. This will improve issue grouping in Sentry.
"sourceRoot": "/"
// generated source code references. This will improve issue grouping in Sentry.
"sourceRoot": "/"
}

0 comments on commit de247e3

Please sign in to comment.