1 Star 0 Fork 0

符俊涛 / ts-axios

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
rollup.config.ts 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
符俊涛 提交于 2021-06-27 16:41 . feat(src/): 发布
/*
* @Author: fjt
* @Date: 2021-06-06 12:21:28
* @LastEditors: fjt
* @LastEditTime: 2021-06-27 10:43:30
*/
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 = 'axios'
export default {
input: `src/index.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: [],
watch: {
include: 'src/**',
},
plugins: [
// Allow json resolution
json(),
// Compile TypeScript files
typescript({ useTsconfigDeclarationDir: true }),
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
commonjs(),
// 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(),
// Resolve source maps to the original source
sourceMaps(),
],
}
TypeScript
1
https://gitee.com/Vuefjt/ts-axios.git
git@gitee.com:Vuefjt/ts-axios.git
Vuefjt
ts-axios
ts-axios
master

搜索帮助