1 Star 0 Fork 0

ShuyunFF2E/cloud-react

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
.fatherrc.ts 2.03 KB
一键复制 编辑 原始数据 按行查看 历史
lonerhan 提交于 2022-09-08 15:11 . 修改cascade问题 (#646)
import NodePath from 'path';
import alias from '@rollup/plugin-alias';
import { eslint } from 'rollup-plugin-eslint';
import copy from 'rollup-plugin-copy';
// import url from '@rollup/plugin-url';
const yargs = require('yargs/yargs');
const { hideBin } = require('yargs/helpers');
const argv = yargs(hideBin(process.argv)).argv;
const isBuild = !(argv.dev || argv.watch);
const externals = [
'react',
'react-dom'
];
export default {
esm: isBuild ? false : 'rollup',
file: 'cloud-react',
// cjs: {
// type: 'rollup',
// minify: !argv.dev,
// },
umd: {
name: 'CloudReact',
file: 'cloud-react',
minFile: true,
},
entry: 'src/components/index.js',
extraExternals: externals,
extractCSS: isBuild,
// extraPostCSSPlugins: [
// require('postcss-font-base64')({
// //future options will be handled here
// })
// ],
extraRollupPlugins: [
eslint({
throwOnError: true,
include: [NodePath.resolve('src/components')],
/* your options */
}),
// url({
// include: ['**/*.woff', '**/*.woff2'],
// limit: Infinity,
// }),
// postcss({
// plugins: [require('postcss-font-base64')({
// //future options will be handled here
// })]
// }),
copy({
targets: [
{ src: 'package.json', dest: 'dist' },
]
}),
alias({
entries: [
{
find: '@utils',
replacement: NodePath.resolve(
NodePath.resolve(__dirname),
'src/utils',
),
// OR place `customResolver` here. See explanation below.
},
{
find: '@contexts',
replacement: NodePath.resolve(
NodePath.resolve(__dirname),
'src/contexts',
),
// OR place `customResolver` here. See explanation below.
},
{
find: '@tests',
replacement: NodePath.resolve(NodePath.resolve(__dirname), 'tests'),
// OR place `customResolver` here. See explanation below.
},
],
}),
],
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/shuyunff2e/cloud-react.git
git@gitee.com:shuyunff2e/cloud-react.git
shuyunff2e
cloud-react
cloud-react
master

搜索帮助