Skip to content

Commit

Permalink
fix(opentrons-ai-client): use babel plugins in correct environments (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
shlokamin authored Jun 5, 2024
1 parent f49c33d commit 0fa37a3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions opentrons-ai-client/babel.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ module.exports = {
production: {
plugins: ['babel-plugin-styled-components', 'babel-plugin-unassert'],
},
staging: {
plugins: ['babel-plugin-styled-components'],
},
development: {
plugins: ['babel-plugin-styled-components'],
},
Expand Down
13 changes: 12 additions & 1 deletion opentrons-ai-client/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import path from 'path'
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import postCssImport from 'postcss-import'
import postCssApply from 'postcss-apply'
import postColorModFunction from 'postcss-color-mod-function'
import postCssPresetEnv from 'postcss-preset-env'
import lostCss from 'lost'

export default defineConfig({
// this makes imports relative rather than absolute
Expand All @@ -25,7 +30,13 @@ export default defineConfig({
},
css: {
postcss: {
plugins: [],
plugins: [
postCssImport({ root: 'src/' }),
postCssApply(),
postColorModFunction(),
postCssPresetEnv({ stage: 0 }),
lostCss(),
],
},
},
define: {
Expand Down

0 comments on commit 0fa37a3

Please sign in to comment.