Skip to content

Commit

Permalink
fix .less file using tailwind @apply not working (#12031)
Browse files Browse the repository at this point in the history
* fix: when using tailwind compatible with less, it needs config postcss

* feat: adopt existed post css plugin
  • Loading branch information
xiekw2010 authored Jan 5, 2024
1 parent 7076342 commit 41f1908
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/preset-umi/src/commands/generators/tailwindcss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export default (api: IApi) => {
});

h.setUmirc('tailwindcss', {});
const existingPlugins = api.config?.extraPostCSSPlugins || [];
h.setUmirc('extraPostCSSPlugins', ['tailwindcss', ...existingPlugins]);
h.appendInternalPlugin('@umijs/plugins/dist/tailwindcss');
logger.info('Update .umirc.ts');

Expand Down

0 comments on commit 41f1908

Please sign in to comment.