Documentation Index
Fetch the complete documentation index at: https://docs.awfixer.me/llms.txt
Use this file to discover all available pages before exploring further.
With jstime dev
When importing CSS in JavaScript-like loaders, CSS is treated special.
By default, JSTime will transform a statement like this:
When platform is browser
<link> is automatically registered when HMR is enabled. That event handler can be turned off either in a framework’s package.json or by setting globalThis["Bun_disableCSSImports"] = true; in client-side code. Additionally, you can get a list of every .css file imported this way via globalThis["__BUN"].allImportedStyles.
When platform is jstime
JSTime.getImportedStyles().
With jstime jstime
JSTime bundles .css files imported via @import into a single file. It doesn’t autoprefix or minify CSS today. Multiple .css files imported in one JavaScript file will not be bundled into one file. You’ll have to import those from a .css file.
This input:
CSS runtime
To support hot CSS reloading, JSTime inserts@supports annotations into CSS that tag which files a stylesheet is composed of. Browsers ignore this, so it doesn’t impact styles.
By default, JSTime’s runtime code automatically listens to onimportcss and will insert the event.detail into a <link rel="stylesheet" href={${event.detail}}> if there is no existing link tag with that stylesheet. That’s how JSTime’s equivalent of style-loader works.