flamingo-carotene-postcss

9.0.0-alpha.13 • Public • Published

Module flamingo-carotene-postcss

The postcss module injects the postcss-loader into the webpack config of the Flamingo Carotene module.

When you want to have your css automatically enriched with postcss, this tiny module helps injecting the corresponding loader.

How to use

npm i -D flamingo-carotene-postcss

The module will do its job on the config command.

How it works

The module will check if there is a postcss config in the root of your project. When found it will look for a loader rule with the test of \.(sa|sc|c)ss$ (exact match only for now) and inject its loader config after the css-loader.

For PostCSS config, the following configs will be found:

  • files in the project root with these names: .postcssrc, .postcssrc.json, .postcssrc.yml, .postcssrc.js, postcss.config.js

When no config was found in your project, this module will use some minor defaults.

  • The autoprefixer plugin will be added. The plugin will respond to the browserslist config.
  • The source map generation will be turned on for production builds.

Troubleshooting

  • [XYZ] requires a peer of postcss@^8.1.0 [...] or Error: true is not a PostCSS plugin Peer dependency PostCSS version 8.1 must be install within project: npm install -D postcss@^8.1.0

Package Sidebar

Install

npm i flamingo-carotene-postcss

Weekly Downloads

7

Version

9.0.0-alpha.13

License

OSL-3.0

Unpacked Size

15.7 kB

Total Files

4

Last publish

Collaborators

  • dmnkdmnt
  • benjamin.egner
  • yesman82
  • d.provost
  • ric.and.o