pradel / create-react-app-esbuild

Use esbuild in your create-react-app for faster compilation, development and tests
MIT License
561 stars 34 forks source link

Error: "You may need and additional loader to handle the result of these loaders" when targeting esnext #60

Closed maecapozzi closed 2 years ago

maecapozzi commented 2 years ago

I'm trying to target esnext, and I'm getting the following error:

image

craco.config.js

{
      plugin: CracoEsbuildPlugin,
      options: {
        enableSvgr: true,
        svgrOptions: {
          icon: true,
        },
        esbuildLoaderOptions: {
          loader: 'tsx',
          target: 'esnext',
        },
        esbuildMinimizerOptions: {
          target: 'es15',
        },
        skipEsbuildJest: true, // Setting this to true enables to us to continue using babel to run jest tests
      },
    },