You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@acidgreenau/webpack-postcss-css-in-js-loader

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@acidgreenau/webpack-postcss-css-in-js-loader

A loader for webpack, that allows PostCSS in JS.

1.0.0
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

PostCSS in JS/TS

This Webpack loader is very simple it aims to:

  • Replace PostCSS from stylesheets inside of JavaScript
  • To the output of the PostCSS compiler

To achieve the above functionality, we need to flag where the PostCSS starts and ends. To do so we need to:

  • pass a comment at the start: //*__POSTCSS__*//
  • Pass a comment at the end: //!*__POSTCSS__*//
  • With the only differences being a bang! at the start of the comment.

The loader should be passed after all other loaders required.

  • If you have JavaScript or Typescript
  • Pass it after the ts-loader, or babel-loader.

FAQs

Package last updated on 24 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts