Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = function override(config, env) {
config = injectBabelPlugin([
'import', {
libraryName: 'antd',
libraryDirectory: 'es',
style: 'css'
}
], config);
const rewires = compose(rewireLess.withLoaderOptions({
modifyVars: {
// "@primary-color": "#DB7093",
// "@info-color": "#DB7093",
// "@layout-body-background": "#fff"
}
}));
return rewires(config, env);
};
module.exports = function ( config, env ) {
const rewires = compose(
rewireStyledComponents,
rewireSVG,
);
// Set SC_ATTR env var.
config.plugins.push( new webpack.EnvironmentPlugin( {
SC_ATTR: 'data-styled-components-hm-workflows',
} ) );
// Set externals.
config.externals = Object.assign( config.externals || {}, {
HM: 'HM',
} );
return rewires( config, env );
}
const cssLoader = getLoader(
config.module.rules,
rule => String(rule.test) === String(/\.module\.css$/),
).loader.find(loader => loaderNameMatches(loader, "css-loader"));
cssLoader.options.localIdentName = "ma-[hash:base64:8]";
// Include bundle analyzation
config.plugins.push(
new BundleAnalyzerPlugin({
analyzerMode: "static",
openAnalyzer: false,
}),
);
}
const rewires = compose(
rewireLess.withLoaderOptions({
javascriptEnabled: true,
modifyVars: {
"@primary-color": "#ff79c6",
"@info-color": "#61dafb",
"@layout-body-background": "#EEEEF0",
"@layout-header-background": "#fff",
"@layout-sider-background": "#282A36",
"@menu-dark-bg": "#282A36",
"@menu-dark-submenu-bg": "#000a0a",
},
}),
);
return rewires(config, env);
};
module.exports = (config, env) => {
// global config
config = compose(rewireTypescript)(config, env);
config.resolve.modules.push(Path.resolve(process.cwd(), 'src'));
// Production config
if (env === 'production') {
}
// Development config
else {
config.module.rules.push({
test: /\.(ts|tsx)$/,
enforce: 'pre',
exclude: /node_modules/,
use: [
{
loader: 'prettier-loader',
options: JSON.parse(Fs.readFileSync(Path.resolve('..', '.prettierrc'), 'utf8'))
module.exports = (config, env) => {
// global config
config = compose(rewireTypescript)(config, env);
config.resolve.modules.push(Path.resolve(process.cwd(), 'src'));
// Production config
if (env === 'production') {
}
// Development config
else {
config = rewireReactHotLoader(config, env);
config.module.rules.push({
test: /\.(ts|tsx)$/,
enforce: 'pre',
exclude: /node_modules/,
use: [
{
});
return config;
}
function injectExternal(external) {
return (config, _env) => {
return merge(config, {
externals: {
[external]: `commonjs ${external}`
}
});
};
}
module.exports = compose(
injectTarget,
injectSassLoader,
injectPublicPath,
rewireBabel,
injectExternal('@cityofzion/neon-js'),
injectExternal('node-hid')
);
const { compose } = require('react-app-rewired')
const rewireEslint = require('react-app-rewire-eslint')
const rewireReactHotLoader = require('react-app-rewire-hot-loader')
module.exports = compose(
rewireEslint,
rewireReactHotLoader
)
module.exports = function ( config, env ) {
const rewires = compose(
rewireStyledComponents,
rewireSVG,
);
return rewires( config, env );
}
const { compose } = require('react-app-rewired');
const rewireLess = require('react-app-rewire-less');
const rewireSvgReactLoader = require('react-app-rewire-svg-react-loader');
module.exports = compose(rewireLess, rewireSvgReactLoader);
const { compose } = require('react-app-rewired');
const rewireEslint = require('react-app-rewire-eslint');
const rewirePolyfills = require('react-app-rewire-polyfills');
module.exports = compose(rewirePolyfills, rewireEslint);