setup preflight:false doesn't work in Preact wmr dev server
See original GitHub issue(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',
},
});
},
});
Issue Analytics
- State:
- Created 3 years ago
- Comments:29 (19 by maintainers)
Top Results From Across the Web
Preact CLI or WMR? · Issue #867 - GitHub
My current project was set up using preact-cli . I've been happily using it for close to two years now. Lately though I've...
Read more >Get Started with WMR
Create a new project in seconds using create-wmr. This tiny tool instantly scaffolds a new project for you, with npm scripts for development...
Read more >Configuration and Theming - Twind
The setup function is a named export of the twind module and accepts a configuration object as an argument. TIP. The setup function...
Read more >How to configure the preact dev server to use a different ...
The solution is not preact.config.js, as I thought, but preact-cli, which accepts a number of parameters to configure the webserver:
Read more >The Preact Team Releases WMR to Simplify Modern Web App ...
Jason Miller, creator of 3KB Preact alternative to React, recently released WMR, a *tiny all-in-one development tool for modern web apps*.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The problem was hard to diagnose at first because of tree shaking (i.e. an unused import is discarded, but a simple
console.log
on 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 😃