fix(webpack): support jsx syntax in esbuild (#1014)

This commit is contained in:
Xin Du (Clark) 2021-10-14 14:21:55 +01:00 committed by GitHub
parent e11e8b05b1
commit 080f497eee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ export function esbuild (ctx: WebpackConfigContext) {
config.module.rules.push(
{
test: /\.m?[jt]sx?$/i,
test: /\.m?[jt]s$/i,
loader: 'esbuild-loader',
exclude: (file) => {
file = file.split('node_modules', 2)[1]
@ -35,7 +35,7 @@ export function esbuild (ctx: WebpackConfigContext) {
}
},
{
test: /\.tsx$/,
test: /\.m?[jt]sx$/,
loader: 'esbuild-loader',
options: {
loader: 'tsx',