rauschma,
@rauschma@fosstodon.org avatar

For static site generation, I’d love to use CSS modules (*):
– Required: support for Node.js + TypeScript + browsers
– I bundle with esbuild, so browsers are OK.

Current approach (no CSS modules, not type safe):
– Import CSS & bundle via esbuild.
– Ignore non-code imports in Node.js via a loader.

Future?
– Compile CSS to JSON with names
– Import & use JSON for SSR in Node.js. Also works in TS.
– Esbuild bundles CSS, not JSON. Via custom plugin?

Suggestions?

(*) https://github.com/css-modules/css-modules

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • GTA5RPClips
  • rosin
  • thenastyranch
  • Youngstown
  • InstantRegret
  • slotface
  • osvaldo12
  • kavyap
  • khanakhh
  • Durango
  • megavids
  • everett
  • cisconetworking
  • normalnudes
  • tester
  • ngwrru68w68
  • cubers
  • modclub
  • tacticalgear
  • provamag3
  • Leos
  • anitta
  • JUstTest
  • lostlight
  • All magazines