Skip to content

knpwrs/css-modules-electron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

css-modules-electron

Load CSS Modules in Electron. Once registered, you can require CSS modules and they will automatically be compiled and injected into the head element of your Electron app.

Usage

This module has the same requirements as css-modules-require-hook. That means you must have the following modules installed:

  • postcss version 4 or higher
  • postcss-modules-extract-imports
  • postcss-modules-local-by-default
  • postcss-modules-scope

You can register the hook in Electron by requiring the register module:

require('css-modules-electron/register');

You can also specify options using the same API as css-modules-require-hook by requiring the core module directly:

require('css-modules-electron')({
  // `css-modules-require-hook` options here
});

See example/src/front.js for a working example.

Running the Example

npm i
npm start

About

A require hook to compile and use CSS modules in Electron.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy