1 Star 0 Fork 0

胡宪阳/vis-network

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rollup.config.js 1.79 KB
一键复制 编辑 原始数据 按行查看 历史
import commonjs from 'rollup-plugin-commonjs';
import nodeResolve from 'rollup-plugin-node-resolve';
import babel from 'rollup-plugin-babel';
import typescript from 'rollup-plugin-typescript2';
import minify from 'rollup-plugin-babel-minify';
import genHeader from './lib/header';
import css from 'rollup-plugin-css-porter';
// TypeScript because Babel transpiles modules in isolation, therefore no type reexports.
// CommonJS because Babel is not 100 % ESM.
const plugins = {
nodeResolve: nodeResolve({
extensions: ['.ts', '.js', '.json']
}),
typescript: typescript({
tsconfig: 'tsconfig.code.json'
}),
commonjs: commonjs(),
babel: babel({
extensions: ['.ts', '.js'],
runtimeHelpers: true
}),
minify: minify({ comments: false }),
cssRaw: css({
raw: 'dist/vis-network.css',
minified: false
}),
cssMin: css({
raw: false,
minified: 'dist/vis-network.min.css'
})
}
export default [
{
input: 'lib/index-bundle.ts',
output: [{
file: 'dist/vis-network.esm.js',
format: 'esm',
banner: genHeader('network'),
sourcemap: true
}, {
file: 'dist/vis-network.js',
format: 'umd',
exports: 'named',
name: 'vis',
extend: true,
banner: genHeader('network'),
sourcemap: true
}],
plugins: [
plugins.commonjs,
plugins.nodeResolve,
plugins.cssRaw,
plugins.typescript,
plugins.babel
]
},
{
input: 'lib/index-bundle.ts',
output: [{
file: 'dist/vis-network.esm.min.js',
format: 'esm',
banner: genHeader('network'),
sourcemap: true
}, {
file: 'dist/vis-network.min.js',
format: 'umd',
exports: 'named',
name: 'vis',
extend: true,
banner: genHeader('network'),
sourcemap: true
}],
plugins: [
plugins.commonjs,
plugins.nodeResolve,
plugins.cssMin,
plugins.typescript,
plugins.babel,
plugins.minify
]
}
]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hu_xian_yang/vis-network.git
[email protected]:hu_xian_yang/vis-network.git
hu_xian_yang
vis-network
vis-network
master

搜索帮助