1 Star 3 Fork 1

louiscrew/screw-axios

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rollup.config.js 1.02 KB
一键复制 编辑 原始数据 按行查看 历史
quan.wen 提交于 2022-09-02 17:14 . 添加esm规范打包
import path from "path"
import { terser } from "rollup-plugin-terser"
import { nodeResolve } from "@rollup/plugin-node-resolve"
import commonjs from "@rollup/plugin-commonjs"
import { babel } from "@rollup/plugin-babel"
import json from "@rollup/plugin-json"
import alias from "@rollup/plugin-alias"
const pathResolve = p => path.resolve(__dirname, p)
export default {
// external: [/node_modules/],
input: "./src/index.js",
output: [
{
file: "dist/bundle.js",
format: "umd",
name: "ScrewAxios",
},
{
file: "dist/bundle.es.js",
format: "es",
},
{
file: "dist/bundle.min.js",
format: "umd",
name: "ScrewAxios",
plugins: [terser()],
},
],
plugins: [
alias({
entries: [{ find: "@", replacement: pathResolve("src") }],
}),
nodeResolve({
preferBuiltins: true,
browser: true,
mainFields: ["jsnext"],
}),
commonjs(),
json(),
babel({
exclude: "node_modules/**",
babelHelpers: "bundled",
}),
],
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/louiscrew/screw-axios.git
git@gitee.com:louiscrew/screw-axios.git
louiscrew
screw-axios
screw-axios
master

搜索帮助