customize-cra
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -1,2 +0,2 @@ | ||
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var flow=_interopDefault(require("lodash.flow"));function _defineProperty(e,s,r){return s in e?Object.defineProperty(e,s,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[s]=r,e}function _objectSpread2(e){for(var s=1;s<arguments.length;s++)if(s%2){var r=null!=arguments[s]?arguments[s]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(s){_defineProperty(e,s,r[s])})}else Object.defineProperties(e,Object.getOwnPropertyDescriptors(arguments[s]));return e}const getBabelLoader=(e,s)=>{let r;r=s?e=>e.loader&&e.loader.includes("babel")&&e.exclude:e=>e.loader&&e.loader.includes("babel")&&e.include;let o=e.module.rules.find(e=>Array.isArray(e.oneOf)).oneOf,l=o.find(r);return l||(l=(o=o.reduce((e,s)=>e.concat(s.use||[]),[])).find(r)),l},addBundleVisualizer=(e={},s=!1)=>r=>{const o=require("webpack-bundle-analyzer").BundleAnalyzerPlugin;return s&&!process.argv.includes("--analyze")||r.plugins.push(new o(Object.assign({analyzerMode:"static",reportFilename:"report.html"},e))),r},disableEsLint=()=>e=>{return e.module.rules.filter(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc)).forEach(s=>{e.module.rules=e.module.rules.filter(e=>e!==s)}),e},addWebpackAlias=e=>s=>(s.resolve||(s.resolve={}),s.resolve.alias||(s.resolve.alias={}),Object.assign(s.resolve.alias,e),s),addWebpackResolve=e=>s=>(s.resolve||(s.resolve={}),Object.assign(s.resolve,e),s),addWebpackPlugin=e=>s=>(s.plugins.push(e),s),adjustWorkbox=e=>s=>(s.plugins.forEach(s=>{"GenerateSW"===s.constructor.name&&e(s.config)}),s),useEslintRc=e=>s=>{const r=s.module.rules.filter(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc))[0];r.use[0].options.useEslintrc=!0,r.use[0].options.ignore=!0,r.use[0].options.configFile=e,delete r.use[0].options.baseConfig;const o=s.module.rules.map(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc)?r:e);return s.module.rules=o,s},enableEslintTypescript=()=>e=>{const s=e.module.rules.filter(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc))[0];s.test=/\.([j,t]sx?|mjs)$/;const r=e.module.rules.map(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc)?s:e);return e.module.rules=r,e},addLessLoader=(e={})=>s=>{const r="development"===process.env.NODE_ENV?"dev":"prod",o="./"===require("react-scripts/config/paths").servedPath,l="prod"===r&&"false"!==process.env.GENERATE_SOURCEMAP,t=/\.module\.less$/,a=e.localIdentName||"[path][name]__[local]--[hash:base64:5]",n=s=>["dev"===r?require.resolve("style-loader"):{loader:require("mini-css-extract-plugin").loader,options:Object.assign({},o?{publicPath:"../../"}:void 0)},{loader:require.resolve("css-loader"),options:s},{loader:require.resolve("postcss-loader"),options:{ident:"postcss",plugins:()=>[require("postcss-flexbugs-fixes"),require("postcss-preset-env")({autoprefixer:{flexbox:"no-2009"},stage:3})],sourceMap:l}},{loader:require.resolve("less-loader"),options:Object.assign(e,{source:l})}],i=s.module.rules.find(e=>Array.isArray(e.oneOf)).oneOf;return i.splice(i.length-1,0,{test:/\.less$/,exclude:t,use:n({importLoaders:2}),sideEffects:"prod"===r},{test:t,use:n({importLoaders:2,modules:!0,localIdentName:a})}),s},watchAll=()=>e=>(process.argv.includes("--watch-all")&&delete e.watchOptions,e),disableChunk=()=>e=>(e.optimization.splitChunks={cacheGroups:{default:!1}},e.optimization.runtimeChunk=!1,e),addWebpackExternals=e=>s=>(s.externals=_objectSpread2({},s.externals,{},e),s),addPostcssPlugins=e=>s=>{return s.module.rules.find(e=>Array.isArray(e.oneOf)).oneOf.forEach(s=>s.use&&s.use.forEach(s=>{if(s.options&&"postcss"===s.options.ident&&(s.options.plugins||(s.options.plugins=()=>[...e]),s.options.plugins)){const r=s.options.plugins;s.options.plugins=()=>[...r(),...e]}})),s},removeModuleScopePlugin=()=>e=>(e.resolve.plugins=e.resolve.plugins.filter(e=>"ModuleScopePlugin"!==e.constructor.name),e),addTslintLoader=e=>s=>(s.module.rules.unshift({test:/\.(ts|tsx)$/,loader:"tslint-loader",options:e,enforce:"pre"}),s),addBabelPlugin=e=>s=>(getBabelLoader(s).options.plugins.push(e),s),addExternalBabelPlugin=e=>s=>{const r=getBabelLoader(s,!0).options;return r.plugins||(r.plugins=[]),r.plugins.push(e),s},addBabelPreset=e=>s=>(getBabelLoader(s).options.presets.push(e),s),addDecoratorsLegacy=()=>e=>addBabelPlugin(["@babel/plugin-proposal-decorators",{legacy:!0}])(e),useBabelRc=()=>e=>(getBabelLoader(e).options.babelrc=!0,e),babelInclude=e=>s=>(getBabelLoader(s).include=e,s),addBabelPlugins=(...e)=>e.map(e=>addBabelPlugin(e)),addExternalBabelPlugins=(...e)=>e.map(e=>addExternalBabelPlugin(e)),addBabelPresets=(...e)=>e.map(e=>addBabelPreset(e)),fixBabelImports=(e,s)=>addBabelPlugin(["import",Object.assign({},{libraryName:e},s),`fix-${e}-imports`]),override=(...e)=>flow(...e.filter(e=>e)),overrideDevServer=(...e)=>s=>(r,o)=>{const l=s(r,o);return override(...e)(l)};exports.addBabelPlugin=addBabelPlugin,exports.addBabelPlugins=addBabelPlugins,exports.addBabelPreset=addBabelPreset,exports.addBabelPresets=addBabelPresets,exports.addBundleVisualizer=addBundleVisualizer,exports.addDecoratorsLegacy=addDecoratorsLegacy,exports.addExternalBabelPlugin=addExternalBabelPlugin,exports.addExternalBabelPlugins=addExternalBabelPlugins,exports.addLessLoader=addLessLoader,exports.addPostcssPlugins=addPostcssPlugins,exports.addTslintLoader=addTslintLoader,exports.addWebpackAlias=addWebpackAlias,exports.addWebpackExternals=addWebpackExternals,exports.addWebpackPlugin=addWebpackPlugin,exports.addWebpackResolve=addWebpackResolve,exports.adjustWorkbox=adjustWorkbox,exports.babelInclude=babelInclude,exports.disableChunk=disableChunk,exports.disableEsLint=disableEsLint,exports.enableEslintTypescript=enableEslintTypescript,exports.fixBabelImports=fixBabelImports,exports.getBabelLoader=getBabelLoader,exports.override=override,exports.overrideDevServer=overrideDevServer,exports.removeModuleScopePlugin=removeModuleScopePlugin,exports.useBabelRc=useBabelRc,exports.useEslintRc=useEslintRc,exports.watchAll=watchAll; | ||
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var flow=_interopDefault(require("lodash.flow"));function _defineProperty(e,s,r){return s in e?Object.defineProperty(e,s,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[s]=r,e}function _objectSpread2(e){for(var s=1;s<arguments.length;s++)if(s%2){var r=null!=arguments[s]?arguments[s]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(s){_defineProperty(e,s,r[s])})}else Object.defineProperties(e,Object.getOwnPropertyDescriptors(arguments[s]));return e}const getBabelLoader=(e,s)=>{let r;r=s?e=>e.loader&&e.loader.includes("babel")&&e.exclude:e=>e.loader&&e.loader.includes("babel")&&e.include;let o=e.module.rules.find(e=>Array.isArray(e.oneOf)).oneOf,t=o.find(r);return t||(t=(o=o.reduce((e,s)=>e.concat(s.use||[]),[])).find(r)),t},addBundleVisualizer=(e={},s=!1)=>r=>{const o=require("webpack-bundle-analyzer").BundleAnalyzerPlugin;return s&&!process.argv.includes("--analyze")||r.plugins.push(new o(Object.assign({analyzerMode:"static",reportFilename:"report.html"},e))),r},disableEsLint=()=>e=>{return e.module.rules.filter(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc)).forEach(s=>{e.module.rules=e.module.rules.filter(e=>e!==s)}),e},addWebpackAlias=e=>s=>(s.resolve||(s.resolve={}),s.resolve.alias||(s.resolve.alias={}),Object.assign(s.resolve.alias,e),s),addWebpackResolve=e=>s=>(s.resolve||(s.resolve={}),Object.assign(s.resolve,e),s),addWebpackPlugin=e=>s=>(s.plugins.push(e),s),adjustWorkbox=e=>s=>(s.plugins.forEach(s=>{"GenerateSW"===s.constructor.name&&e(s.config)}),s),useEslintRc=e=>s=>{const r=s.module.rules.filter(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc))[0];r.use[0].options.useEslintrc=!0,r.use[0].options.ignore=!0,r.use[0].options.configFile=e,delete r.use[0].options.baseConfig;const o=s.module.rules.map(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc)?r:e);return s.module.rules=o,s},enableEslintTypescript=()=>e=>{const s=e.module.rules.filter(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc))[0];s.test=/\.([j,t]sx?|mjs)$/;const r=e.module.rules.map(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc)?s:e);return e.module.rules=r,e},addLessLoader=(e={})=>s=>{const r="development"===process.env.NODE_ENV?"dev":"prod",o="./"===require("react-scripts/config/paths").servedPath,t="prod"===r&&"false"!==process.env.GENERATE_SOURCEMAP,l=/\.module\.less$/,a=e.localIdentName||"[path][name]__[local]--[hash:base64:5]",n=s=>["dev"===r?require.resolve("style-loader"):{loader:require("mini-css-extract-plugin").loader,options:Object.assign({},o?{publicPath:"../../"}:void 0)},{loader:require.resolve("css-loader"),options:s},{loader:require.resolve("postcss-loader"),options:{ident:"postcss",plugins:()=>[require("postcss-flexbugs-fixes"),require("postcss-preset-env")({autoprefixer:{flexbox:"no-2009"},stage:3})],sourceMap:t}},{loader:require.resolve("less-loader"),options:Object.assign(e,{source:t})}],i=s.module.rules.find(e=>Array.isArray(e.oneOf)).oneOf;return i.splice(i.length-1,0,{test:/\.less$/,exclude:l,use:n({importLoaders:2}),sideEffects:"prod"===r},{test:l,use:n({importLoaders:2,modules:!0,localIdentName:a})}),s},watchAll=()=>e=>(process.argv.includes("--watch-all")&&delete e.watchOptions,e),disableChunk=()=>e=>(e.optimization.splitChunks={cacheGroups:{default:!1}},e.optimization.runtimeChunk=!1,e),addWebpackExternals=e=>s=>{let r=s.externals;return r?Array.isArray(e)?r=e.concat(r):Array.isArray(r)||e.constructor===Function||e.constructor===RegExp?r=[e].concat(r):e instanceof Object&&r instanceof Object&&(r=_objectSpread2({},r,{},e)):r=e,s.externals=r,s},addPostcssPlugins=e=>s=>{return s.module.rules.find(e=>Array.isArray(e.oneOf)).oneOf.forEach(s=>s.use&&s.use.forEach(s=>{if(s.options&&"postcss"===s.options.ident&&(s.options.plugins||(s.options.plugins=()=>[...e]),s.options.plugins)){const r=s.options.plugins;s.options.plugins=()=>[...r(),...e]}})),s},removeModuleScopePlugin=()=>e=>(e.resolve.plugins=e.resolve.plugins.filter(e=>"ModuleScopePlugin"!==e.constructor.name),e),addTslintLoader=e=>s=>(s.module.rules.unshift({test:/\.(ts|tsx)$/,loader:"tslint-loader",options:e,enforce:"pre"}),s),addBabelPlugin=e=>s=>(getBabelLoader(s).options.plugins.push(e),s),addExternalBabelPlugin=e=>s=>{const r=getBabelLoader(s,!0).options;return r.plugins||(r.plugins=[]),r.plugins.push(e),s},addBabelPreset=e=>s=>(getBabelLoader(s).options.presets.push(e),s),addDecoratorsLegacy=()=>e=>addBabelPlugin(["@babel/plugin-proposal-decorators",{legacy:!0}])(e),useBabelRc=()=>e=>(getBabelLoader(e).options.babelrc=!0,e),babelInclude=e=>s=>(getBabelLoader(s).include=e,s),addBabelPlugins=(...e)=>e.map(e=>addBabelPlugin(e)),addExternalBabelPlugins=(...e)=>e.map(e=>addExternalBabelPlugin(e)),addBabelPresets=(...e)=>e.map(e=>addBabelPreset(e)),fixBabelImports=(e,s)=>addBabelPlugin(["import",Object.assign({},{libraryName:e},s),`fix-${e}-imports`]),override=(...e)=>flow(...e.filter(e=>e)),overrideDevServer=(...e)=>s=>(r,o)=>{const t=s(r,o);return override(...e)(t)};exports.addBabelPlugin=addBabelPlugin,exports.addBabelPlugins=addBabelPlugins,exports.addBabelPreset=addBabelPreset,exports.addBabelPresets=addBabelPresets,exports.addBundleVisualizer=addBundleVisualizer,exports.addDecoratorsLegacy=addDecoratorsLegacy,exports.addExternalBabelPlugin=addExternalBabelPlugin,exports.addExternalBabelPlugins=addExternalBabelPlugins,exports.addLessLoader=addLessLoader,exports.addPostcssPlugins=addPostcssPlugins,exports.addTslintLoader=addTslintLoader,exports.addWebpackAlias=addWebpackAlias,exports.addWebpackExternals=addWebpackExternals,exports.addWebpackPlugin=addWebpackPlugin,exports.addWebpackResolve=addWebpackResolve,exports.adjustWorkbox=adjustWorkbox,exports.babelInclude=babelInclude,exports.disableChunk=disableChunk,exports.disableEsLint=disableEsLint,exports.enableEslintTypescript=enableEslintTypescript,exports.fixBabelImports=fixBabelImports,exports.getBabelLoader=getBabelLoader,exports.override=override,exports.overrideDevServer=overrideDevServer,exports.removeModuleScopePlugin=removeModuleScopePlugin,exports.useBabelRc=useBabelRc,exports.useEslintRc=useEslintRc,exports.watchAll=watchAll; | ||
//# sourceMappingURL=index.cjs.js.map |
@@ -1,2 +0,2 @@ | ||
import e from"lodash.flow";function s(e,s,o){return s in e?Object.defineProperty(e,s,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[s]=o,e}const o=(e,s)=>{let o;o=s?e=>e.loader&&e.loader.includes("babel")&&e.exclude:e=>e.loader&&e.loader.includes("babel")&&e.include;let r=e.module.rules.find(e=>Array.isArray(e.oneOf)).oneOf,t=r.find(o);return t||(t=(r=r.reduce((e,s)=>e.concat(s.use||[]),[])).find(o)),t},r=(e={},s=!1)=>o=>{const r=require("webpack-bundle-analyzer").BundleAnalyzerPlugin;return s&&!process.argv.includes("--analyze")||o.plugins.push(new r(Object.assign({analyzerMode:"static",reportFilename:"report.html"},e))),o},t=()=>e=>{return e.module.rules.filter(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc)).forEach(s=>{e.module.rules=e.module.rules.filter(e=>e!==s)}),e},n=e=>s=>(s.resolve||(s.resolve={}),s.resolve.alias||(s.resolve.alias={}),Object.assign(s.resolve.alias,e),s),l=e=>s=>(s.resolve||(s.resolve={}),Object.assign(s.resolve,e),s),i=e=>s=>(s.plugins.push(e),s),u=e=>s=>(s.plugins.forEach(s=>{"GenerateSW"===s.constructor.name&&e(s.config)}),s),a=e=>s=>{const o=s.module.rules.filter(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc))[0];o.use[0].options.useEslintrc=!0,o.use[0].options.ignore=!0,o.use[0].options.configFile=e,delete o.use[0].options.baseConfig;const r=s.module.rules.map(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc)?o:e);return s.module.rules=r,s},p=()=>e=>{const s=e.module.rules.filter(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc))[0];s.test=/\.([j,t]sx?|mjs)$/;const o=e.module.rules.map(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc)?s:e);return e.module.rules=o,e},c=(e={})=>s=>{const o="development"===process.env.NODE_ENV?"dev":"prod",r="./"===require("react-scripts/config/paths").servedPath,t="prod"===o&&"false"!==process.env.GENERATE_SOURCEMAP,n=/\.module\.less$/,l=e.localIdentName||"[path][name]__[local]--[hash:base64:5]",i=s=>["dev"===o?require.resolve("style-loader"):{loader:require("mini-css-extract-plugin").loader,options:Object.assign({},r?{publicPath:"../../"}:void 0)},{loader:require.resolve("css-loader"),options:s},{loader:require.resolve("postcss-loader"),options:{ident:"postcss",plugins:()=>[require("postcss-flexbugs-fixes"),require("postcss-preset-env")({autoprefixer:{flexbox:"no-2009"},stage:3})],sourceMap:t}},{loader:require.resolve("less-loader"),options:Object.assign(e,{source:t})}],u=s.module.rules.find(e=>Array.isArray(e.oneOf)).oneOf;return u.splice(u.length-1,0,{test:/\.less$/,exclude:n,use:i({importLoaders:2}),sideEffects:"prod"===o},{test:n,use:i({importLoaders:2,modules:!0,localIdentName:l})}),s},d=()=>e=>(process.argv.includes("--watch-all")&&delete e.watchOptions,e),f=()=>e=>(e.optimization.splitChunks={cacheGroups:{default:!1}},e.optimization.runtimeChunk=!1,e),m=e=>o=>(o.externals=function(e){for(var o=1;o<arguments.length;o++)if(o%2){var r=null!=arguments[o]?arguments[o]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.forEach(function(o){s(e,o,r[o])})}else Object.defineProperties(e,Object.getOwnPropertyDescriptors(arguments[o]));return e}({},o.externals,{},e),o),g=e=>s=>{return s.module.rules.find(e=>Array.isArray(e.oneOf)).oneOf.forEach(s=>s.use&&s.use.forEach(s=>{if(s.options&&"postcss"===s.options.ident&&(s.options.plugins||(s.options.plugins=()=>[...e]),s.options.plugins)){const o=s.options.plugins;s.options.plugins=()=>[...o(),...e]}})),s},b=()=>e=>(e.resolve.plugins=e.resolve.plugins.filter(e=>"ModuleScopePlugin"!==e.constructor.name),e),v=e=>s=>(s.module.rules.unshift({test:/\.(ts|tsx)$/,loader:"tslint-loader",options:e,enforce:"pre"}),s),h=e=>s=>(o(s).options.plugins.push(e),s),O=e=>s=>{const r=o(s,!0).options;return r.plugins||(r.plugins=[]),r.plugins.push(e),s},y=e=>s=>(o(s).options.presets.push(e),s),E=()=>e=>h(["@babel/plugin-proposal-decorators",{legacy:!0}])(e),j=()=>e=>(o(e).options.babelrc=!0,e),x=e=>s=>(o(s).include=e,s),P=(...e)=>e.map(e=>h(e)),w=(...e)=>e.map(e=>O(e)),q=(...e)=>e.map(e=>y(e)),A=(e,s)=>h(["import",Object.assign({},{libraryName:e},s),`fix-${e}-imports`]),z=(...s)=>e(...s.filter(e=>e)),N=(...e)=>s=>(o,r)=>{const t=s(o,r);return z(...e)(t)};export{h as addBabelPlugin,P as addBabelPlugins,y as addBabelPreset,q as addBabelPresets,r as addBundleVisualizer,E as addDecoratorsLegacy,O as addExternalBabelPlugin,w as addExternalBabelPlugins,c as addLessLoader,g as addPostcssPlugins,v as addTslintLoader,n as addWebpackAlias,m as addWebpackExternals,i as addWebpackPlugin,l as addWebpackResolve,u as adjustWorkbox,x as babelInclude,f as disableChunk,t as disableEsLint,p as enableEslintTypescript,A as fixBabelImports,o as getBabelLoader,z as override,N as overrideDevServer,b as removeModuleScopePlugin,j as useBabelRc,a as useEslintRc,d as watchAll}; | ||
import e from"lodash.flow";function s(e,s,o){return s in e?Object.defineProperty(e,s,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[s]=o,e}const o=(e,s)=>{let o;o=s?e=>e.loader&&e.loader.includes("babel")&&e.exclude:e=>e.loader&&e.loader.includes("babel")&&e.include;let r=e.module.rules.find(e=>Array.isArray(e.oneOf)).oneOf,t=r.find(o);return t||(t=(r=r.reduce((e,s)=>e.concat(s.use||[]),[])).find(o)),t},r=(e={},s=!1)=>o=>{const r=require("webpack-bundle-analyzer").BundleAnalyzerPlugin;return s&&!process.argv.includes("--analyze")||o.plugins.push(new r(Object.assign({analyzerMode:"static",reportFilename:"report.html"},e))),o},t=()=>e=>{return e.module.rules.filter(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc)).forEach(s=>{e.module.rules=e.module.rules.filter(e=>e!==s)}),e},n=e=>s=>(s.resolve||(s.resolve={}),s.resolve.alias||(s.resolve.alias={}),Object.assign(s.resolve.alias,e),s),l=e=>s=>(s.resolve||(s.resolve={}),Object.assign(s.resolve,e),s),i=e=>s=>(s.plugins.push(e),s),u=e=>s=>(s.plugins.forEach(s=>{"GenerateSW"===s.constructor.name&&e(s.config)}),s),a=e=>s=>{const o=s.module.rules.filter(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc))[0];o.use[0].options.useEslintrc=!0,o.use[0].options.ignore=!0,o.use[0].options.configFile=e,delete o.use[0].options.baseConfig;const r=s.module.rules.map(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc)?o:e);return s.module.rules=r,s},c=()=>e=>{const s=e.module.rules.filter(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc))[0];s.test=/\.([j,t]sx?|mjs)$/;const o=e.module.rules.map(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc)?s:e);return e.module.rules=o,e},p=(e={})=>s=>{const o="development"===process.env.NODE_ENV?"dev":"prod",r="./"===require("react-scripts/config/paths").servedPath,t="prod"===o&&"false"!==process.env.GENERATE_SOURCEMAP,n=/\.module\.less$/,l=e.localIdentName||"[path][name]__[local]--[hash:base64:5]",i=s=>["dev"===o?require.resolve("style-loader"):{loader:require("mini-css-extract-plugin").loader,options:Object.assign({},r?{publicPath:"../../"}:void 0)},{loader:require.resolve("css-loader"),options:s},{loader:require.resolve("postcss-loader"),options:{ident:"postcss",plugins:()=>[require("postcss-flexbugs-fixes"),require("postcss-preset-env")({autoprefixer:{flexbox:"no-2009"},stage:3})],sourceMap:t}},{loader:require.resolve("less-loader"),options:Object.assign(e,{source:t})}],u=s.module.rules.find(e=>Array.isArray(e.oneOf)).oneOf;return u.splice(u.length-1,0,{test:/\.less$/,exclude:n,use:i({importLoaders:2}),sideEffects:"prod"===o},{test:n,use:i({importLoaders:2,modules:!0,localIdentName:l})}),s},d=()=>e=>(process.argv.includes("--watch-all")&&delete e.watchOptions,e),f=()=>e=>(e.optimization.splitChunks={cacheGroups:{default:!1}},e.optimization.runtimeChunk=!1,e),m=e=>o=>{let r=o.externals;return r?Array.isArray(e)?r=e.concat(r):Array.isArray(r)||e.constructor===Function||e.constructor===RegExp?r=[e].concat(r):e instanceof Object&&r instanceof Object&&(r=function(e){for(var o=1;o<arguments.length;o++)if(o%2){var r=null!=arguments[o]?arguments[o]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.forEach(function(o){s(e,o,r[o])})}else Object.defineProperties(e,Object.getOwnPropertyDescriptors(arguments[o]));return e}({},r,{},e)):r=e,o.externals=r,o},g=e=>s=>{return s.module.rules.find(e=>Array.isArray(e.oneOf)).oneOf.forEach(s=>s.use&&s.use.forEach(s=>{if(s.options&&"postcss"===s.options.ident&&(s.options.plugins||(s.options.plugins=()=>[...e]),s.options.plugins)){const o=s.options.plugins;s.options.plugins=()=>[...o(),...e]}})),s},b=()=>e=>(e.resolve.plugins=e.resolve.plugins.filter(e=>"ModuleScopePlugin"!==e.constructor.name),e),v=e=>s=>(s.module.rules.unshift({test:/\.(ts|tsx)$/,loader:"tslint-loader",options:e,enforce:"pre"}),s),O=e=>s=>(o(s).options.plugins.push(e),s),h=e=>s=>{const r=o(s,!0).options;return r.plugins||(r.plugins=[]),r.plugins.push(e),s},y=e=>s=>(o(s).options.presets.push(e),s),E=()=>e=>O(["@babel/plugin-proposal-decorators",{legacy:!0}])(e),j=()=>e=>(o(e).options.babelrc=!0,e),x=e=>s=>(o(s).include=e,s),A=(...e)=>e.map(e=>O(e)),P=(...e)=>e.map(e=>h(e)),w=(...e)=>e.map(e=>y(e)),q=(e,s)=>O(["import",Object.assign({},{libraryName:e},s),`fix-${e}-imports`]),z=(...s)=>e(...s.filter(e=>e)),N=(...e)=>s=>(o,r)=>{const t=s(o,r);return z(...e)(t)};export{O as addBabelPlugin,A as addBabelPlugins,y as addBabelPreset,w as addBabelPresets,r as addBundleVisualizer,E as addDecoratorsLegacy,h as addExternalBabelPlugin,P as addExternalBabelPlugins,p as addLessLoader,g as addPostcssPlugins,v as addTslintLoader,n as addWebpackAlias,m as addWebpackExternals,i as addWebpackPlugin,l as addWebpackResolve,u as adjustWorkbox,x as babelInclude,f as disableChunk,t as disableEsLint,c as enableEslintTypescript,q as fixBabelImports,o as getBabelLoader,z as override,N as overrideDevServer,b as removeModuleScopePlugin,j as useBabelRc,a as useEslintRc,d as watchAll}; | ||
//# sourceMappingURL=index.esm.js.map |
{ | ||
"name": "customize-cra", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "repository": "arackaf/customize-cra", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
50034
48
0