Can I publish CSS on JSR?
If I wanted to install CSS from JSR using CSS module scripts & import attributes, would that be possible?
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?
@theengineear Import attributes are finished but CSS imports are not.
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)
@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;
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?