-
Notifications
You must be signed in to change notification settings - Fork 102
Expand file tree
/
Copy pathrollup.config.js
More file actions
33 lines (29 loc) · 918 Bytes
/
rollup.config.js
File metadata and controls
33 lines (29 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import resolve from "@rollup/plugin-node-resolve";
import terser from "@rollup/plugin-terser";
import { babel } from "@rollup/plugin-babel";
import typescript from "@rollup/plugin-typescript";
import { typescriptPaths } from "rollup-plugin-typescript-paths";
const extensions = ['.js', '.jsx', '.ts', '.tsx', '.json']
const indexConfig = {
input: "./src/index.ts",
output: {
file: "./dist/index.js",
format: "es",
inlineDynamicImports: true,
},
external: ["react", "react/jsx-runtime", "flowise-embed"],
plugins: [
resolve({ extensions }),
babel({
babelHelpers: "bundled",
exclude: "node_modules/**",
presets: ["@babel/preset-react", "@babel/preset-typescript"],
extensions,
}),
typescript(),
typescriptPaths({ preserveExtensions: true }),
terser({ output: { comments: false } }),
],
};
const configs = [indexConfig];
export default configs;