mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 08:19:07 +00:00
fix(admin): use appropriate loader between jsx and tsx (#18670)
This commit is contained in:
parent
e741a4a0c0
commit
03194ce5a3
@ -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',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user