Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"scripts": {
"build:types": "tsc -p tsconfig.build.json",
"build:js": "tsup",
"build:css": "tailwindcss -i src/styles/global.css -o dist/tailwind.css --minify && node scripts/strip-layers.js",
"build:css": "postcss src/styles/global.css -o dist/tailwind.css",
"build": "pnpm build:css && pnpm build:js && pnpm build:types",
"dev": "concurrently \"tailwindcss -i src/styles/global.css -o dist/tailwind.css --watch\" \"NODE_ENV=development tsup --watch\"",
"test": "vitest run --project unit",
Expand Down Expand Up @@ -71,20 +71,24 @@
"@storybook/addon-vitest": "10.0.0",
"@storybook/react-vite": "10.0.0",
"@tailwindcss/cli": "4.1.15",
"@tailwindcss/postcss": "^4.1.15",
"@testing-library/jest-dom": "6.9.1",
"@testing-library/react": "16.3.0",
"@types/react": "19.2.2",
"@types/react-dom": "19.2.2",
"@vitejs/plugin-react": "5.0.4",
"@vitest/browser-playwright": "4.0.4",
"@vitest/coverage-v8": "4.0.4",
"autoprefixer": "^10.4.23",
"concurrently": "9.2.1",
"cssnano": "^7.1.2",
"dotenv-cli": "7.4.2",
"eslint-plugin-storybook": "10.0.0",
"jsdom": "27.0.1",
"msw": "2.11.6",
"msw-storybook-addon": "2.0.6",
"playwright": "1.56.1",
"postcss-cli": "^11.0.1",
"storybook": "10.0.0",
"tailwindcss": "4.1.15",
"tsup": "8.5.0",
Expand Down
19 changes: 19 additions & 0 deletions packages/ui/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import tailwindcss from '@tailwindcss/postcss';
import autoprefixer from 'autoprefixer';
import cssnano from 'cssnano';

const removeLayersPlugin = () => ({
postcssPlugin: 'postcss-remove-layers',
AtRule: {
layer: (atRule) => {
// Unwrap the contents and remove the @layer wrapper
console.log('Found @layer:', atRule.params);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.log statement left in production code

Suggested change
console.log('Found @layer:', atRule.params);
// Unwrap the contents and remove the @layer wrapper

atRule.replaceWith(atRule.nodes);
},
},
});
removeLayersPlugin.postcss = true;

export default {
plugins: [tailwindcss, autoprefixer, removeLayersPlugin, cssnano],
};
48 changes: 0 additions & 48 deletions packages/ui/scripts/strip-layers.js

This file was deleted.

Loading
Loading