Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

customize-cra

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

customize-cra - npm Package Compare versions

Comparing version 0.2.8 to 0.2.9

21

index.js

@@ -99,2 +99,3 @@ const flow = require("lodash.flow");

eslintRule.use[0].options.useEslintrc = true;
eslintRule.use[0].options.ignore = true;
delete eslintRule.use[0].options.baseConfig;

@@ -253,2 +254,19 @@

const addPostcssPlugins = (plugins) => config => {
const rules = config.module.rules.find(rule => Array.isArray(rule.oneOf))
.oneOf;
rules.forEach(r => r.use && r.use.forEach(u => {
if (u.options && u.options.ident === "postcss") {
if (!u.options.plugins) {
u.options.plugins = () => [...plugins];
}
if (u.options.plugins) {
const originalPlugins = u.options.plugins;
u.options.plugins = () => [...originalPlugins(), ...plugins];
}
}
}));
return config;
}
module.exports = {

@@ -273,3 +291,4 @@ override,

addBabelPresets,
disableChunk
disableChunk,
addPostcssPlugins
};

2

package.json
{
"name": "customize-cra",
"version": "0.2.8",
"version": "0.2.9",
"description": "",

@@ -5,0 +5,0 @@ "repository": "arackaf/customize-cra",

@@ -320,1 +320,19 @@ # customize-cra

```
### add post-css plugins
To add post-css plugins, you can use `addPostcssPlugins`.
```js
const {
override,
addPostcssPlugins
} = require("customize-cra");
module.exports = override(
addPostcssPlugins([
require('postcss-px2rem')({ remUnit: 37.5 })
]),
);
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc