UNPKG

964 BJavaScriptView Raw
1import typescript from "@rollup/plugin-typescript";
2import commonjs from "@rollup/plugin-commonjs";
3import resolve from "@rollup/plugin-node-resolve";
4import url from "@rollup/plugin-url";
5import postcss from "rollup-plugin-postcss";
6
7const 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
38export default config;