16 Star 119 Fork 23

小弟调调 / oscnews

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
.kktrc.js 1.12 KB
一键复制 编辑 原始数据 按行查看 历史
小弟调调 提交于 2021-04-26 20:20 . chore: 修复编译错误问题。
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
import FileManagerPlugin from 'filemanager-webpack-plugin';
import lessModules from '@kkt/less-modules';
export default (conf, env, options) => {
conf = lessModules(conf, env, options);
conf.output.publicPath = './';
const regexp = /(ReactRefreshWebpackPlugin)/;
conf.plugins = conf.plugins.map((item) => {
if (item.constructor && item.constructor.name && regexp.test(item.constructor.name)) {
return null;
}
return item;
}).filter(Boolean);
conf.plugins.push(new CleanWebpackPlugin({
// cleanStaleWebpackAssets: true
}));
conf.plugins.push(
new FileManagerPlugin({
events: {
onEnd: {
copy: [
{ source: './chrome-main/manifest.json', destination: './dist/manifest.json' },
{ source: './chrome-main/background.js', destination: './dist/background.js' },
{ source: './chrome-main/osc-logo.png', destination: './dist/osc-logo.png' },
{ source: './src/dev-site/public/icons', destination: './dist/icons' },
],
},
},
}),
);
return conf;
}
JavaScript
1
https://gitee.com/jaywcjlove/oscnews.git
git@gitee.com:jaywcjlove/oscnews.git
jaywcjlove
oscnews
oscnews
master

搜索帮助