Skip to content

Commit

Permalink
build: exclude postcss from lib
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurD1 committed Sep 20, 2024
1 parent 0c1e579 commit 42d0954
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions harp_apps/dashboard/frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ export default defineConfig(({ mode }) => {
"process.env.DISABLE_MOCKS": JSON.stringify(String(!!env.DISABLE_MOCKS)),
"process.env.NODE_ENV": JSON.stringify(env.NODE_ENV || "production"),
}

const postcss =
mode === "lib"
? {
plugins: [tailwindcss],
}
: {
plugins: [tailwindcss],
}

const build =
mode === "lib"
? {
Expand Down Expand Up @@ -81,9 +91,7 @@ export default defineConfig(({ mode }) => {
jsxInject: `import React from 'react'`,
},
css: {
postcss: {
plugins: [tailwindcss],
},
postcss: postcss,
},
plugins: [
dts({
Expand Down

0 comments on commit 42d0954

Please sign in to comment.