20 Star 144 Fork 26

小弟调调 / hotkeys

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.kktrc.js 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
小弟调调 提交于 2022-04-09 12:01 . website: support dark theme.
import path from 'path';
import webpack from 'webpack';
import lessModules from '@kkt/less-modules';
import rawModules from '@kkt/raw-modules';
import scopePluginOptions from '@kkt/scope-plugin-options';
import pkg from './package.json';
export default (conf, env, options) => {
conf = lessModules(conf, env, options);
conf = rawModules(conf, env, options);
conf = scopePluginOptions(conf, env, {
...options,
allowedFiles: [path.resolve(process.cwd(), 'README.md')],
});
// Get the project version.
conf.plugins.push(
new webpack.DefinePlugin({
VERSION: JSON.stringify(pkg.version),
})
);
if (env === 'production') {
conf.optimization = {
...conf.optimization,
splitChunks: {
cacheGroups: {
reactvendor: {
test: /[\\/]node_modules[\\/](react|react-dom)[\\/]/,
name: 'react-vendor',
chunks: 'all',
},
refractor: {
test: /[\\/]node_modules[\\/](refractor)[\\/]/,
name: 'refractor-vendor',
chunks: 'all',
},
},
},
};
conf.output = { ...conf.output, publicPath: './' };
}
return conf;
}
JavaScript
1
https://gitee.com/jaywcjlove/hotkeys.git
git@gitee.com:jaywcjlove/hotkeys.git
jaywcjlove
hotkeys
hotkeys
master

搜索帮助