UNPKG

servibot

Version:

This is the official API for ServiBot, an advanced AI chatbot which provides enhanced customer service to businesses.

61 lines (55 loc) 1.27 kB
import babel from "@rollup/plugin-babel"; import image from "rollup-plugin-image"; // import resolve from "@rollup/plugin-node-resolve"; // import commonjs from "@rollup/plugin-commonjs"; import sourcemaps from "rollup-plugin-sourcemaps"; // the entry point for the library const input = "src/index.js"; // var MODE = [ { fomart: "cjs", }, { fomart: "esm", }, { fomart: "umd", }, ]; var config = []; MODE.map((m) => { var conf = { input: input, output: { // then name of your package name: "servibot", file: `dist/index.${m.fomart}.js`, format: m.fomart, exports: "auto", }, // this externelizes react to prevent rollup from compiling it external: ["react", /@babel\/runtime/], plugins: [ // these are babel comfigurations babel({ exclude: "node_modules/**", plugins: ["@babel/transform-runtime"], babelHelpers: "runtime", }), // this adds sourcemaps sourcemaps(), image(), // resolve(), // commonjs(), // this adds support for styles // styles({ // postcss: { // plugins: [autoprefixer()], // }, // }), ], }; config.push(conf); }); export default [...config];