1 Star 0 Fork 0

Shijie/vue-vulcan

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rollup.config.ts 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
velley 提交于 2021-03-22 16:12 . 修改配置
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import sourceMaps from 'rollup-plugin-sourcemaps';
import camelCase from 'lodash.camelcase';
import typescript from 'rollup-plugin-typescript2';
import json from 'rollup-plugin-json';
const pkg = require('./package.json')
const libraryName = 'index'
export default {
input: `packages/${libraryName}.ts`,
output: [
{ file: pkg.main, name: camelCase(libraryName), format: 'umd', sourcemap: true },
{ file: pkg.module, format: 'es', sourcemap: true }
],
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash')
external: [/^vue/],
watch: {
include: 'packages/**',
},
plugins: [
// Allow json resolution
json(),
// Allow node_modules resolution, so you can use 'external' to control
// which external modules to include in the bundle
// https://github.com/rollup/rollup-plugin-node-resolve#usage
resolve(),
// Compile TypeScript files
typescript({useTsconfigDeclarationDir: true, check: false}),
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
commonjs(),
// uglify(),
// Resolve source maps to the original source
sourceMaps(),
],
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Stepan-sj/vue-vulcan.git
git@gitee.com:Stepan-sj/vue-vulcan.git
Stepan-sj
vue-vulcan
vue-vulcan
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385