Skip to content

Commit

Permalink
Export the apollo-client properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
markrickert authored and frankcalise committed Mar 22, 2024
1 parent 6308fcf commit 13664a1
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
29 changes: 29 additions & 0 deletions lib/reactotron-apisauce/rollup.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import replace from "@rollup/plugin-replace"
import filesize from "rollup-plugin-filesize"
import { terser } from "rollup-plugin-terser"
import typescript from "@rollup/plugin-typescript"

const pkg = require("./package.json")

/** @type {import('rollup').RollupOptions} */
export default {
input: "src/index.ts",
output: [
{
file: pkg.main,
format: "cjs",
},
{
file: pkg.module,
format: "esm",
},
],
plugins: [
typescript(),
replace({
REACTOTRON_CORE_CLIENT_VERSION: pkg.version,
}),
process.env.NODE_ENV === "production" ? terser() : null,
filesize(),
],
}
2 changes: 1 addition & 1 deletion lib/reactotron-apollo-client/rollup.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const pkg = require("./package.json")

/** @type {import('rollup').RollupOptions} */
export default {
input: "src/reactotron-apollo-client.ts",
input: "src/index.ts",
output: [
{
file: pkg.main,
Expand Down
2 changes: 2 additions & 0 deletions lib/reactotron-apollo-client/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
import apolloClient from "./reactotron-apollo-client"
export * from "./reactotron-apollo-client"
export default apolloClient

0 comments on commit 13664a1

Please sign in to comment.