Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* eslint-disable */
/* config-overrides.js */
const {
useBabelRc, override, fixBabelImports, addLessLoader,
} = require('customize-cra');
const path = require('path');
module.exports = override(
useBabelRc(),
fixBabelImports('import', {
libraryName: 'antd',
libraryDirectory: 'es',
style: true,
}),
addLessLoader({
javascriptEnabled: true,
modifyVars: {
'hack': `true; @import "${ path.resolve(__dirname, 'src/styles/less/theme.less')}";`,// Override with less file
},
}),
);
//@ts-check
'use strict';
const { addWebpackPlugin, override, useBabelRc, addWebpackAlias } = require('customize-cra');
const MonacoEditorWebpackPlugin = require('monaco-editor-webpack-plugin');
const WorkerPlugin = require('worker-plugin');
module.exports = override(
addWebpackPlugin(new MonacoEditorWebpackPlugin()),
addWebpackPlugin(new WorkerPlugin()),
useBabelRc(),
addWebpackAlias({
'@velcro/bundler': '@velcro/bundler/dist/dist-module/index.js',
'@velcro/resolver-host-compound': '@velcro/resolver-host-compound/dist/dist-module/index.js',
'@velcro/resolver-host-unpkg': '@velcro/resolver-host-unpkg/dist/dist-module/index.js',
'@velcro/resolver': '@velcro/resolver/dist/dist-module/index.js',
})
);
useBabelRc
} = require('customize-cra')
const path = require('path')
const theme = require('./package.json').theme
module.exports = {
webpack: override(
addWebpackAlias({
'@components': path.resolve(__dirname, 'src/components'),
'@assets': path.resolve(__dirname, 'src/assets'),
'@layouts': path.resolve(__dirname, 'src/layouts'),
'@utils': path.resolve(__dirname, 'src/utils'),
'@store': path.resolve(__dirname, 'src/store'),
'@containers': path.resolve(__dirname, 'src/containers'),
'@services': path.resolve(__dirname, 'src/services')
}),
useBabelRc(),
fixBabelImports('import', {
libraryName: 'antd-mobile',
libraryDirectory: 'lib',
style: true,
legacy: true
}),
addLessLoader({
javascriptEnabled: true,
modifyVars: theme
}),
addDecoratorsLegacy({
legacy: true
})
)
}
redirect: {
url: link
},
template: 'redirect.html',
filename: key + '/index.html',
inject: false,
xhtml: false
})
)
}
return config
}
module.exports = override(
useBabelRc(),
useEslintRc(),
addWebpackAlias({
react: 'preact/compat',
'react-dom': 'preact/compat'
}),
addSitePlugins()
)