mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 07:40:33 +00:00
fix(webpack): support jsx syntax in esbuild (#1014)
This commit is contained in:
parent
e11e8b05b1
commit
080f497eee
@ -13,7 +13,7 @@ export function esbuild (ctx: WebpackConfigContext) {
|
|||||||
|
|
||||||
config.module.rules.push(
|
config.module.rules.push(
|
||||||
{
|
{
|
||||||
test: /\.m?[jt]sx?$/i,
|
test: /\.m?[jt]s$/i,
|
||||||
loader: 'esbuild-loader',
|
loader: 'esbuild-loader',
|
||||||
exclude: (file) => {
|
exclude: (file) => {
|
||||||
file = file.split('node_modules', 2)[1]
|
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',
|
loader: 'esbuild-loader',
|
||||||
options: {
|
options: {
|
||||||
loader: 'tsx',
|
loader: 'tsx',
|
||||||
|
Loading…
Reference in New Issue
Block a user