Skip to content

Can I publish CSS on JSR? #293

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

Open
o-t-w opened this issue Mar 16, 2024 · 5 comments
Open

Can I publish CSS on JSR? #293

o-t-w opened this issue Mar 16, 2024 · 5 comments

Comments

@o-t-w
Copy link

o-t-w commented Mar 16, 2024

If I wanted to install CSS from JSR using CSS module scripts & import attributes, would that be possible?

@github-project-automation github-project-automation bot moved this to Needs Triage in JSR Mar 16, 2024
@theengineear
Copy link

I just tried this today and am hitting error: The import attribute type of "css" is unsupported. “Import Attributes” is a Finished Proposal according to the TC39 process. Any tickets which could be followed here?

@phaux
Copy link

phaux commented Nov 6, 2024

@theengineear Import attributes are finished but CSS imports are not.

@theengineear
Copy link

theengineear commented Nov 6, 2024

Got it — are JSON Modules good to go then at this point then? Is this the right ticket to follow for updates (given that Import Attributes are done, I get the sense that CSS imports will not be far off — they’re already supported in some browsers).

(thanks for the quick response, btw)

@crowlKats crowlKats moved this from Needs Triage to Needs Plan in JSR Jan 17, 2025
@crowlKats crowlKats marked this as a duplicate of #471 Jan 17, 2025
@TriMoon
Copy link

TriMoon commented Feb 28, 2025

@theengineear i'm currently able to successfully publish on JSR with this in my module: 😉

import jsrJSON from './jsr.json' with {type: 'json'};
/** The version of this module. */
export const version: string = jsrJSON.version;
/** The package name/ID of this module on JSR */
export const id: string = jsrJSON.name;

@danielbeeke
Copy link

I tried:

import '../style.css' with { type: 'css' }

Does not seem to work at the moment. Would be cool to be able to use.

Is there another way to publish css along with a JSR module?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Plan
Development

No branches or pull requests

5 participants