1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/lf7817-react-admin-template

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
config-overrides.js 1.6 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
lf7817 Отправлено 09.09.2019 05:43 106df9e
/*
* @Author: lifan
* @Date: 2019-01-22 08:43:32
* @Last Modified by: lf7817
* @Last Modified time: 2019-08-01 09:05:06
*/
const {
override,
addBundleVisualizer,
fixBabelImports,
addLessLoader,
addWebpackAlias,
disableEsLint,
addTslintLoader,
} = require("customize-cra");
const StyleLintPlugin = require("stylelint-webpack-plugin");
const path = require("path");
const isProduction = process.env.NODE_ENV === "production";
const splitAntdIconChunck = () => config => {
config.module.rules.push({
loader: "webpack-ant-icon-loader",
enforce: "pre",
include: [require.resolve("@ant-design/icons/lib/dist")],
});
return config;
};
const addStylint = () => config => {
config.plugins.push(
new StyleLintPlugin({
context: "src",
configFile: path.resolve(__dirname, "./.stylelintrc.json"),
files: "**/*.scss",
failOnError: false,
quiet: true,
syntax: "scss",
fix: true,
})
);
return config;
};
module.exports = override(
addLessLoader({
modifyVars: {
// '@primary-color': '#FA541c',
},
javascriptEnabled: true,
}),
isProduction && addBundleVisualizer(),
addStylint(),
fixBabelImports("antd", {
style: true,
libraryDirectory: "es",
}),
fixBabelImports("react-use", {
libraryDirectory: "lib",
camel2DashComponentName: false,
}),
disableEsLint(),
addTslintLoader(),
addWebpackAlias({
// '@ant-design/icons/lib/dist$': path.resolve(__dirname, './src/components/icons.js'),
"@": path.resolve(__dirname, "./src"),
}),
splitAntdIconChunck()
);

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/lf7817-react-admin-template.git
git@api.gitlife.ru:oschina-mirror/lf7817-react-admin-template.git
oschina-mirror
lf7817-react-admin-template
lf7817-react-admin-template
feature/ts