tailwind-preset `cjs` build issue
See original GitHub issueI noticed that the .cjs build output is missing the dividend default value on the ratios function. This causes the ratios to not get outputted (thus affecting the resolved default config) in a cjs environment.
let dividend = 1 IS in the source: https://github.com/tw-in-js/twind/blob/next/packages/preset-tailwind/src/defaultTheme.ts#L831
Versus the compiled cjs in the distributed npm package:
I’m currently on @twind/preset-tailwind@1.0.0-next.30, but I don’t think this is specific to 30.
Just in case it’s relevant - ran into this while trying to use https://github.com/muhammadsammy/tailwindcss-classnames. Noticed that the x/y ratio classes were not present in the generated typings, and tracked it down to this missing default val on the ratios func.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)

Top Related StackOverflow Question
made a mistake by adding a comment but not fixing the bug. will be fixed in 1.0.0-next.32
https://github.com/tw-in-js/twind/commit/916e7fb928e3e90703126792d704ad561bc1d01a
Great catch! If I change it to
varit works. All other for-loops seem to be ok.