2

unfortunately I can't manage to include the tailwind styles in the (Cypress/Angular) component test. I already tried to import the styles in cypress/support/component.ts. However, I get an error here.

The following error originated from your test code, not from Cypress.

  > Module parse failed: Unexpected character '@' (1:0)

You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

> @tailwind base;

Unfortunately, I have no idea at all how to include them.

I thank you for any help.

4ern
  • 965
  • 1
  • 9
  • 21
  • Did you found a solution? – distante Jul 21 '23 at 13:19
  • This question is related to this one https://stackoverflow.com/questions/74507350/how-to-include-scss-styles-in-angular-cypress-component-testing (which is also without a correct answer for now) – Fyodor Jul 24 '23 at 09:23
  • hi i actually got it to work :) I'm sorry that I answer only now. The problem was Angular libs that also use Tailwind. So I just have to include them in the tailwind.config file. like: ` module.exports = { content: { './node_modules/@my-lib/**/*.{js, mjs}' } } ` – 4ern Jul 26 '23 at 12:50

0 Answers0