1 | import typescript from "@rollup/plugin-typescript";
|
2 | import commonjs from "@rollup/plugin-commonjs";
|
3 | import resolve from "@rollup/plugin-node-resolve";
|
4 | import url from "@rollup/plugin-url";
|
5 | import postcss from "rollup-plugin-postcss";
|
6 |
|
7 | const config = [
|
8 | {
|
9 | preserveEntrySignatures: true,
|
10 | input: "src/react.tsx",
|
11 | output: [
|
12 | {
|
13 | exports: "auto",
|
14 | name: "react",
|
15 | dir: "dist",
|
16 | format: "es",
|
17 | preserveModules: false,
|
18 | globals: {
|
19 | 'react-dom': 'ReactDOM',
|
20 | },
|
21 | },
|
22 | ],
|
23 | plugins: [
|
24 | postcss({
|
25 | extensions: [".css"],
|
26 | }),
|
27 | url(),
|
28 | resolve(),
|
29 | commonjs(),
|
30 | typescript({
|
31 | tsconfig: "./tsconfig.json",
|
32 | }),
|
33 | ],
|
34 | external: ["react-dom"],
|
35 | },
|
36 | ];
|
37 |
|
38 | export default config;
|