徐徐爱coding
  • 首页
  • 爱情买卖
  • 导航
  • 私语
  • 友情链接
  • 关于
    关于本站
    知识库
    弹钢琴
徐徐爱coding

徐徐爱coding

徐徐爱coding是一个个人博客站点,记录编程经历的点点滴滴,分享自己的所见与所得,坚持自己的初心,践行自己的梦想生活不是等着暴风雨过去,而是学会在风雨中跳舞!

Copyright © 2023 徐徐爱coding All Rights Reserved.
陕公网安备61019602000456陕ICP备2023007787号-2

网站已稳定运行

rollup常用插件

rollup常用插件

徐徐
前端
#rollup
0 热度0 评论0 点赞
发布于2024-11-22 16:17:27
🌺前言
rollup常用插件

  1. @rollup/plugin-commonjs 处理cjs模块
  2. @rollup/plugin-node-resolve 处理npm包
  3. @rollup/plugin-json 处理json编程es对象
javascript
import json from "@rollup/plugin-json";
import nodeResolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
export default {
  input: "src/index.js",
  output: [
    // {
    //   file: "dist/bundle-iife.js",
    //   format: "iife",
    // },
    {
    //   file: "dist/bundle-esm.js",
      dir:'dist',
      format: "esm",
    },
    // {
    //   file: "dist/bundle-amd.js",
    //   format: "amd",
    // },
    // {
    //     file: "dist/bundle-cjs.js",
    //     format: "cjs",
    //   },
  ],
  plugins:[
    json(),
    nodeResolve(),
    commonjs()
  ]
};
文章最后更新于 2024-12-03 17:02:30
作者:徐徐
版权声明:转载请注明文章出处
留言
暂无数据

~~空空如也