Skip to content

Getting Error when using with react-ts  #1

@yaldram

Description

@yaldram
  • Hey thanks for this plugin, unfortunately I am facing an error here is my vite-config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import prismjs from "vite-plugin-prismjs";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    prismjs({
      languages: ["javascript"],
      plugins: [],
      theme: "twilight",
      css: false,
    }),
    react({
      babel: {
        plugins: [
          [
            "babel-plugin-styled-components",
            {
              displayName: true,
              fileName: false,
            },
          ],
          [
            "prismjs",
            {
              languages: ["javascript"],
              plugins: [],
              theme: "twilight",
              css: false,
            },
          ],
        ],
      },
    }),
  ],
});

I have the following dependencies - babel-plugin-prismjs, vite-plugin-prismjs.

My error -
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions