You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
does not work the way I was expecting. For example, getExt('file.test.js') will return test.js. So I need to specify e.g.:
loaders: {
'.test.js': 'jsx',
'.js': 'jsx',
}
if I want both *.test.js and *.js files to use the JSX loader. And I would need to do this for any other "double extension" (e.g. *.story.js, etc.). I would expect loaders: { '.js': 'jsx' } to be sufficient here.
Is there a reason the getExt helper behaves this way? I think it's fairly unexpected and differs from e.g. path.extname behaviour.
The text was updated successfully, but these errors were encountered:
I was trying to configure the loader used for all
.js
files, because I need to use the JSX parser for.js
due to legacy constraints.However, the
getExt
logic fromesbuild-jest/src/utils.ts
Line 5 in daa5847
getExt('file.test.js')
will returntest.js
. So I need to specify e.g.:if I want both
*.test.js
and*.js
files to use the JSX loader. And I would need to do this for any other "double extension" (e.g.*.story.js
, etc.). I would expectloaders: { '.js': 'jsx' }
to be sufficient here.Is there a reason the
getExt
helper behaves this way? I think it's fairly unexpected and differs from e.g.path.extname
behaviour.The text was updated successfully, but these errors were encountered: