0

Do any one knows how to make react cosmos render tailwind styles in remix js framework ? if yes give me steps please

i am trying to render react components in remix js framework and and i have integrated react cosmos package for testing the components so components rendered correctly by react cosmos but tailwind styles didn't rendered

I tried to make alot of things from ajusting the cosmos.config.json like that

{
  "plugins": ["react-cosmos-plugin-webpack"],
  "globalImports": ["/global.css"],
  "webpack": {
    "overridePath": "./webpack.override.js"
  }
}

and here is my webpack.override.js file

export default (config, { env }) => {
  // Add a rule to handle postcss.config.js for Tailwind
  config.module.rules.push({
    test: /\.css$/,
    use: ["style-loader", "css-loader", "postcss-loader"],
  });

  // Return the modified configuration
  return config;
};

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.