Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with @vitejs/plugin-react #6

Closed
FezVrasta opened this issue Oct 11, 2021 · 1 comment
Closed

Does not work with @vitejs/plugin-react #6

FezVrasta opened this issue Oct 11, 2021 · 1 comment

Comments

@FezVrasta
Copy link

Hi, as soon I enable your plugin I get syntax errors on JSX syntax.

This is my config:

export default defineConfig(({ mode }) => {
  const env = loadEnv(mode, 'env'); // reuse vite's env parser to inject into our index.html

  return {
    esbuild: {
      loader: 'jsx',
      include: /src\/.*\.jsx?$/,
      exclude: [],
    },
    plugins: [
      macrosPlugin(),
      reactPlugin({
        // Exclude storybook stories
        exclude: /\.stories\.(t|j)sx?$/,
      }),
    ],
  };
});

I tried to change the order of the plugins but it didn't help.

@shlroland
Copy link

@itsMapleLeaf hello,do you fix this problem?I meet the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants