UNPKG

835 BJavaScriptView Raw
1import { visualizer } from 'rollup-plugin-visualizer';
2const isBundleVis = !!process.env.BUNDLE_VIS;
3
4export default process.env.CI && process.env.CI === 'true'
5 ? {}
6 : {
7 umd: {
8 name: 'F2',
9 file: 'index',
10 minFile: true,
11 },
12 // entry: ['src/index.ts', 'src/jsx/jsx-runtime.ts'],
13 entry: ['src/index.ts'],
14 overridesByEntry: {
15 'src/index.ts': {
16 umd: { name: 'F2', file: 'index' },
17 },
18 // for weixin miniapp
19 // 'src/jsx/jsx-runtime.ts': {
20 // umd: { name: 'F2JSXRuntime', file: 'jsx-runtime' },
21 // },
22 },
23 typescriptOpts: {
24 tsconfigOverride: {
25 compilerOptions: {
26 target: 'es5',
27 },
28 },
29 },
30 extraRollupPlugins: [...(isBundleVis ? [visualizer()] : [])],
31 };