Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite: Viewing complete styles payload or styles file #297

Open
paulm17 opened this issue Nov 3, 2024 · 2 comments
Open

Vite: Viewing complete styles payload or styles file #297

paulm17 opened this issue Nov 3, 2024 · 2 comments
Assignees
Labels
status: waiting for maintainer These issues haven't been looked at yet by a maintainer vite

Comments

@paulm17
Copy link

paulm17 commented Nov 3, 2024

Summary

With NextJS it's possible to view the full styles by right clicking and opening in a new window.

Unfortunately with Vite, it's not possible to do this. (or I have not found a way).

I have a very large and extensive style payload. How can I view this in a browser window or another way? Perhaps an option to log to a file?

Examples

No response

Motivation

I have quite an extensive and very large set of styles from a UI component library and in future a large app.

I need a way of debugging the stylesheet generated by pigment-css using Vite.

Search keywords: vite

@paulm17 paulm17 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 3, 2024
@zannager zannager added the vite label Nov 4, 2024
@brijeshb42
Copy link
Contributor

Not sure I understand. You right click where and view what ?
You can enable sourceMap to true in your Pigment CSS config to enable source maps that'll show up in the browser devtools alongside the generated class name. Clicking on it will take you to where the style was actually defined in the JS/TS file.

@paulm17
Copy link
Author

paulm17 commented Nov 4, 2024

This is with NextJS. As you'll see. I can click the link to the stylesheet and open a new window. With the full stylesheet there.

video

I can't seem to do the same with vite.

Clicking on it will take you to where the style was actually defined in the JS/TS file.

This isn't comparable. I want to see the full stylesheet as I want to eliminate errors that I have introduced. For example borderBottomTop is valid. borderbottomTop is not and will still be in the stylesheet so when I copy and paste into vscode. I can quickly scan the file for any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting for maintainer These issues haven't been looked at yet by a maintainer vite
Projects
None yet
Development

No branches or pull requests

3 participants