Skip to content

node-loader/node-loader-postcss

 
 

Repository files navigation

@node-loader/postcss

A nodejs loader for postcss. This allows you to load CSS files into NodeJS programs by converting them into Javascript modules. The returned ES module has a default property whose value is the compiled CSS string.

Installation

npm install --save @node-loader/postcss

Usage

Now run node with the --loader (or --experimental-loader for older NodeJS version) flag:

node --loader @node-loader/postcss file.js

Configuration

By default, node-loader postcss looks for a configuration file called postcss.config.js in the current working directory. To specify the file path to the configuration file, provide the POSTCSS_CONFIG environment variable:

POSTCSS_CONFIG=/Users/name/some/dir/.postcssrc node --loader @node-loader/postcss file.js

Composition

If you wish to combine postcss loading with other NodeJS loaders, you may do so by using node-loader-core.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published