Comments (10)
As a quick fix so you can continue to use the viewer...you can turn it off in the Tailwind Nuxt Module config and then use it directly via npx tailwind-config-viewer
assuming you have created a tailwind.config.js file in your Nuxt project root.
from tailwind-config-viewer.
@rogden would you accept PR(s) to make this compatible with ESM tailwind configs? I'd be willing to help with that. Additionally, Node 18 is the lowest node version that isn't end of life, so a v2 release could include dropping unsupported node versions as well as a move to ESM compatibility.
from tailwind-config-viewer.
Is there still a need to support both cjs and esm? Maybe we can move forward with esm only.
from tailwind-config-viewer.
@bkjohnson Absolutely!
from tailwind-config-viewer.
ESM support added in v2. Closing this out for now.
from tailwind-config-viewer.
If I'm not wrong, this issue is more about the library moving to ESM syntax internally so possibly the surrounding ecosystem can also take advantage and benefit from it?
from tailwind-config-viewer.
Thanks for the report. I'll need to dig into how to best do this. Might have to create a v2 and force node 12 instead of >=8. From my quick research it seems it can be quite a pain to manage both a cjs and esm version of a library.
from tailwind-config-viewer.
Thanks for looking into this. Maintaining cjs + esm is indeed sadly not easy. The nuxt team developed https://github.com/unjs/unbuild that aims to help with this (I have no experience with this tool, but maybe its helpful).
from tailwind-config-viewer.
@rogden I opened #91 as a first step. I'm not a vue expert, but I'm assuming that being on the latest vue that uses vite will make it easier to ship a version with esm compatibility.
from tailwind-config-viewer.
Supporting esm config files is nice, but I've opened this issue indeed with the wish to have a esm-version of the whole config-viewer package.
Could you please reopen the issue @rogden?
from tailwind-config-viewer.
Related Issues (20)
- Support Tailwind CSS 3 HOT 3
- What about z-index? HOT 5
- Wrong css and js paths when viewer is used as sub directory
- Security issue HOT 1
- When fontWeights are defined the class names and values are not shown HOT 1
- CLI does not support TypeScript HOT 8
- cli export should recursively create the the directory HOT 1
- Add support for fontWeight at FontSize HOT 1
- Suggestion: Edit and export TW config HOT 1
- Adding border-style would be useful too HOT 1
- Wrong class names of negative margins if the config has a prefix
- Add support for css custom properties (variables) HOT 2
- When exporting to static html: Access to fetch from origin 'null' has been blocked by CORS policy HOT 1
- Add ability to inject custom CSS
- Adding a watcher to build and refresh browser on file changes
- can support unocss? HOT 2
- Can you introduce a search function like a search bar HOT 2
- Outdated koa router HOT 10
- ES Module support HOT 35
- `console.log` statement left in build
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tailwind-config-viewer.