Skip to content

Commit 13664a1

Browse files
markrickertfrankcalise
authored andcommitted
Export the apollo-client properly.
1 parent 6308fcf commit 13664a1

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import replace from "@rollup/plugin-replace"
2+
import filesize from "rollup-plugin-filesize"
3+
import { terser } from "rollup-plugin-terser"
4+
import typescript from "@rollup/plugin-typescript"
5+
6+
const pkg = require("./package.json")
7+
8+
/** @type {import('rollup').RollupOptions} */
9+
export default {
10+
input: "src/index.ts",
11+
output: [
12+
{
13+
file: pkg.main,
14+
format: "cjs",
15+
},
16+
{
17+
file: pkg.module,
18+
format: "esm",
19+
},
20+
],
21+
plugins: [
22+
typescript(),
23+
replace({
24+
REACTOTRON_CORE_CLIENT_VERSION: pkg.version,
25+
}),
26+
process.env.NODE_ENV === "production" ? terser() : null,
27+
filesize(),
28+
],
29+
}

lib/reactotron-apollo-client/rollup.config.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const pkg = require("./package.json")
77

88
/** @type {import('rollup').RollupOptions} */
99
export default {
10-
input: "src/reactotron-apollo-client.ts",
10+
input: "src/index.ts",
1111
output: [
1212
{
1313
file: pkg.main,
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
import apolloClient from "./reactotron-apollo-client"
12
export * from "./reactotron-apollo-client"
3+
export default apolloClient

0 commit comments

Comments
 (0)