-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Proposal
Summary
The window package adds unnecessary weight in browser contexts. We can conditionally import this based on if it's a node or browser env.
I'm not sure the best approach here that preserves the types of globalThis though. There are a few possible options. Right now, I'm considering having separate entry points depending on the env:
import { ... } from 'cssom-gen'; // default is the browser version
import { ... } from 'cssom-gen/node'; // sub-path for node importsThere's also conditional imports, but that's potentially messy supporting both CJS/ESM. I don't like it much.
Open to suggestions or PRs from anyone!
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed