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.10 to 0.2.11

.npmignore

95

index.js

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

const useEslintRc = () => config => {
const useEslintRc = configFile => config => {
const eslintRule = config.module.rules.filter(

@@ -101,2 +101,4 @@ r => r.use && r.use.some(u => u.options && u.options.useEslintrc !== void 0)

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

@@ -168,40 +170,45 @@

mode === "prod" && process.env.GENERATE_SOURCEMAP !== "false";
const lessRegex = /\.less$/;
const lessModuleRegex = /\.module\.less$/;
const localIdentName = loaderOptions.localIdentName || "[path][name]__[local]--[hash:base64:5]";
const lessLoader = [
mode === "dev"
? require.resolve("style-loader")
: {
loader: require("mini-css-extract-plugin").loader,
options: Object.assign(
{},
shouldUseRelativeAssetPaths ? { publicPath: "../../" } : undefined
)
},
{
loader: require.resolve("css-loader"),
options: { importLoaders: 2 }
},
{
loader: require.resolve("postcss-loader"),
options: {
ident: "postcss",
plugins: () => [
require("postcss-flexbugs-fixes"),
require("postcss-preset-env")({
autoprefixer: {
flexbox: "no-2009"
},
stage: 3
})
],
sourceMap: shouldUseSourceMap
const getLessLoader = (cssOptions) => {
return [
mode === "dev"
? require.resolve("style-loader")
: {
loader: require("mini-css-extract-plugin").loader,
options: Object.assign(
{},
shouldUseRelativeAssetPaths ? { publicPath: "../../" } : undefined
)
},
{
loader: require.resolve("css-loader"),
options: cssOptions
},
{
loader: require.resolve("postcss-loader"),
options: {
ident: "postcss",
plugins: () => [
require("postcss-flexbugs-fixes"),
require("postcss-preset-env")({
autoprefixer: {
flexbox: "no-2009"
},
stage: 3
})
],
sourceMap: shouldUseSourceMap
}
},
{
loader: require.resolve("less-loader"),
options: Object.assign(loaderOptions, {
source: shouldUseSourceMap
})
}
},
{
loader: require.resolve("less-loader"),
options: Object.assign(loaderOptions, {
source: shouldUseSourceMap
})
}
];
];
};

@@ -213,5 +220,15 @@ const loaders = config.module.rules.find(rule => Array.isArray(rule.oneOf))

loaders.splice(loaders.length - 1, 0, {
test: /\.less$/,
use: lessLoader,
test: lessRegex,
exclude: lessModuleRegex,
use: getLessLoader({
importLoaders: 2
}),
sideEffects: mode === "prod"
}, {
test: lessModuleRegex,
use: getLessLoader({
importLoaders: 2,
modules: true,
localIdentName: localIdentName
})
});

@@ -218,0 +235,0 @@

{
"name": "customize-cra",
"version": "0.2.10",
"version": "0.2.11",
"description": "",

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

@@ -136,5 +136,6 @@ # customize-cra

### useEslintRc()
### useEslintRc(configFile)
Causes your .eslintrc file to be used, rather than the config CRA ships with.
`configFile` is an optional parameter that allows to specify the exact path to the ESLint configuration file.

@@ -338,2 +339,2 @@ ### enableEslintTypescript()

```
```

Sorry, the diff of this file is not supported yet

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