Skip to content

Commit

Permalink
fix: handle cjs, mjs, mts, cts files in the nested rules (#766)
Browse files Browse the repository at this point in the history
* fix: handle cjs, mjs, mts, cts files in the nested rules

* chore: add changeset
  • Loading branch information
jbroma authored Oct 11, 2024
1 parent efff0c2 commit 206d76f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/heavy-drinks-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@callstack/repack": patch
---

Fix handling of cjs,mjs,cts,mts files when transpiling node modules with swc
4 changes: 2 additions & 2 deletions packages/repack/src/rules/nodeModulesLoadingRules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const NODE_MODULES_LOADING_RULES: RuleSetRule = {
]),
rules: [
{
test: /\.jsx?$/,
test: /jsx?$/,
use: [
{
loader: 'builtin:swc-loader',
Expand All @@ -47,7 +47,7 @@ export const NODE_MODULES_LOADING_RULES: RuleSetRule = {
],
},
{
test: /\.tsx?$/,
test: /tsx?$/,
use: [
{
loader: 'builtin:swc-loader',
Expand Down

0 comments on commit 206d76f

Please sign in to comment.