Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WindiCSS Environment #12

Open
fabianmarz opened this issue Oct 14, 2021 · 0 comments
Open

WindiCSS Environment #12

fabianmarz opened this issue Oct 14, 2021 · 0 comments

Comments

@fabianmarz
Copy link

Hi,

first of all thanks for your great work on this tool and providing a tailwind config example. I was trying to adapt this tailwind config to use WindiCSS (https://github.com/windicss/windicss) without any luck. I ran $ bit install windicss-webpack-plugin windicss and changed the lines in the transformers.ts to

import { WebpackConfigTransformer, WebpackConfigMutator } from "@teambit/webpack";
import * as stylesRegexps from "@teambit/webpack.modules.style-regexps";
import WindiCSS from "windicss-webpack-plugin";
import { tailwindConfigPath } from "@fabianmarz/test.styles.tailwind-styles";

function addTailwindConfig(config: WebpackConfigMutator): WebpackConfigMutator {
  // @ts-ignore
  const oneOfRule = findOneOfRuleInPreviewConfig(config.raw.module.rules);
  const cssRule = findCssRuleByCssNoModuleRegexp(oneOfRule);
  if (!cssRule) {
    throw new Error(
      "css rule not found. this probably means the webpack config of bit itself has changed"
    );
  }
  config.addPlugin(new WindiCSS());
  return config;
}
// […]

but when running $ bit compile && bit start I get a lot of missing SCSS/SASS variables from within the bit packages. I just started to tinker with bit so I'm not sure what I need to do to get WindiCSS working with bit.

Maybe you could give me some guidance please?

Thanks in advance 😄

@fabianmarz fabianmarz changed the title WindCSS Environment WindiCSS Environment Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant