How to configure SVGR in a tsup package inside a turborepo

260 views Asked by At

So I was working on a project where I wanna setup svgr inside a tsup package in turborepo.

This is my tsup config

import type { Options } from "tsup";
import { defineConfig } from "tsup";


export default defineConfig((options: Options) => ({
  plugins: [],
  treeshake: true,
  splitting: true,
  entryPoints: ["./**/*.tsx"],
  // format: ["esm"],
  dts: true,
  minify: true,
  clean: true,
  externals: ["react"],
  ...options,
}));

and this is my folder structure

my-turborepo-project/
|-- app/
|   |-- web/
|   |-- docs/
|-- packages/
|   |-- ui/
|   |   |-- components/
|   |   |-- tsup.config.ts
|   |   |-- tailwind.config.mjs
|   |   |-- tsconfig.json
|   |-- tailwind-config/
|   |-- tsconfig/
|   |-- eslint-config/
|-- tsconfig.json
|-- turbo.json
|-- pnpm-workspace.yaml
|-- pnpm-lock.yaml
|-- package.json
|-- .gitignore
0

There are 0 answers