fix(admin): use appropriate loader between jsx and tsx (#18670)

This commit is contained in:
Alexandre BODIN 2023-11-06 11:58:55 +01:00 committed by GitHub
parent e741a4a0c0
commit 03194ce5a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,12 +33,23 @@ const resolveBaseConfig = async (ctx: BuildContext) => {
module: {
rules: [
{
test: /\.(t|j)sx?$/,
test: /\.(ts|tsx)$/,
loader: require.resolve('esbuild-loader'),
options: {
loader: 'tsx',
jsx: 'automatic',
target,
jsx: 'automatic',
},
},
{
test: /\.(js|jsx|mjs)$/,
use: {
loader: require.resolve('esbuild-loader'),
options: {
loader: 'jsx',
target,
jsx: 'automatic',
},
},
},
{