You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
styles.ts:3 Uncaught TypeError: Cannot read property 'header' of undefined
at Object../node_modules/@cannabitrx/applayout.navbar/dist/styles.js (styles.ts:3)
at __webpack_require__ (bootstrap:24)
at fn (hot module replacement:61)
at Object../node_modules/@cannabitrx/applayout.navbar/dist/navbar.js (navbar.tsx:11)
at __webpack_require__ (bootstrap:24)
at fn (hot module replacement:61)
at Object../node_modules/@cannabitrx/applayout.navbar/dist/navbar.composition.js (navbar.composition.tsx:2)
at __webpack_require__ (bootstrap:24)
at fn (hot module replacement:61)
at Module../node_modules/.cache/bit/teambit.preview/preview/base/tailwind/webpack/__compositions-1627981342583.js (__compositions-1627981342583.js:7)
However, twin.macro has worked fine with my other projects. So I'm not sure what's going on here. Any ideas?
for this to work you will need to extend the webpack babel plugin with these plugins:
"babel-plugin-twin",
"babel-plugin-macros",
So in the webpack transformer of the react-tailwind-env, you will need to search for the correct rule in both devServerConfig and previewConfig (the rule is not exactly the same) and add them.
You will also need to make sure these 2 plugins are dependencies of the env.
I can't seem to get Bit working with
twin.macro
.Basically the problem is it thinks this
styled
import doesn't exist:And then it throws this error:
However,
twin.macro
has worked fine with my other projects. So I'm not sure what's going on here. Any ideas?Reproducible environment
https://github.com/dspacejs/react-tailwind-env
Check the
tailwind-button.tsx
component for where I've tried usingtwin.macro
.The text was updated successfully, but these errors were encountered: