twind: setup preflight:false doesn't work in Preact wmr dev server
(Twind version 0.15.8)
I am able to merge new values into Tailwind’s default preflight reset (see example below), but preflight: false doesn’t work as intended (just in case, I also tried preflight: 0, preflight: null and preflight: undefined, to no avail).
setup({
preflight: (preflight) => {
console.log(preflight);
return css({
h1: {
color: 'red',
},
});
},
});
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 29 (19 by maintainers)
The problem was hard to diagnose at first because of tree shaking (i.e. an unused import is discarded, but a simple
console.logon one of the module exports triggers the inclusion of the module in the bundle / execution context). So I decided to look at Twind’s source code and was glad to see that I could re-implement the shim easily thanks to the public observer methods 😃Thanks for your work by the way, much appreciated!
My point exactly (sorry, I was writing from my tiny phone keyboard so I probably wasn’t clear enough 😃