代码拉取完成,页面将自动刷新
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",
}),
],
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。