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

How to support custom babel config for emotion show classname for run dev command #9697

Open
Caesar-APAX opened this issue Jul 3, 2024 · 3 comments

Comments

@Caesar-APAX
Copy link

Caesar-APAX commented Jul 3, 2024

Aslo it need support @styled-coponents to show classname for run dev

Reproduction

https://github.com/Ranger-Theme/ranger-storefront-mui-remix

System Info

Mac os

Used Package Manager

pnpm

Expected Behavior

When i run dev command, the emotion shuld show the class name for StyledXXX

Screen Shot 2024-07-03 at 11 08 41 AM

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

export default defineConfig({
  plugins: [
    react({
      jsxImportSource: "@emotion/react",
      babel: {
        plugins: ["@emotion/babel-plugin"],
      },
    }),
  ],
});
export default defineConfig({
  plugins: [
    remix({
      jsxImportSource: "@emotion/react",
      babel: {
        plugins: ["@emotion/babel-plugin"],
      },
    }),
  ],
});

Actual Behavior

Screen Shot 2024-07-03 at 11 12 33 AM

Not show the real className, just show axjs-xx className

https://dev.to/glocore/configure-emotion-with-your-vite-react-project-7jl

@Caesar-APAX
Copy link
Author

@brophdawg11 Dou you support remix custom babel plugins?

@Caesar-APAX
Copy link
Author

@n8agrin @freeman @dmarkow @brophdawg11 Any update? thanks

@Zigonja
Copy link

Zigonja commented Jul 30, 2024

Also wondering

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

No branches or pull requests

3 participants