Skip to content

Commit

Permalink
Reapply changes from #1439 to the reactotron-apollo-client
Browse files Browse the repository at this point in the history
  • Loading branch information
markrickert committed Feb 14, 2024
1 parent 7ad4929 commit 6c40099
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 453 deletions.
25 changes: 12 additions & 13 deletions lib/reactotron-apollo-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"build:dev": "yarn tsc && yarn compile:dev",
"clean": "trash dist",
"lint": "eslint 'src/**/**.{ts,tsx}'",
"compile": "NODE_ENV=production rollup -c rollup.config.ts",
"compile:dev": "NODE_ENV=development rollup -c rollup.config.ts",
"compile": "NODE_ENV=production rollup -c --strictDeprecations --bundleConfigAsCjs",
"compile:dev": "NODE_ENV=development rollup -c --strictDeprecations --bundleConfigAsCjs",
"tsc": "tsc",
"typecheck": "tsc",
"ci:test": "yarn test --runInBand"
Expand All @@ -50,10 +50,12 @@
},
"devDependencies": {
"@apollo/client": "^3.8.3",
"@babel/core": "^7.21.0",
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.21.0",
"@types/jest": "^29.4.0",
"@babel/core": "^7.23.2",
"@babel/eslint-parser": "^7.23.10",
"@babel/preset-typescript": "^7.23.2",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-typescript": "11.1.1",
"@types/jest": "^29.5.12",
"@types/node": "^11.9.5",
"@types/ramda": "^0.25.50",
"@typescript-eslint/eslint-plugin": "^5.54.0",
Expand All @@ -70,15 +72,12 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-standard": "^5.0.0",
"graphql": "^16.8.0",
"jest": "^29.4.3",
"jest": "^29.7.0",
"prettier": "^2.8.4",
"reactotron-core-client": "workspace:*",
"rollup": "^1.1.2",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-babel-minify": "^7.0.0",
"rollup-plugin-filesize": "^6.0.1",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-resolve": "^0.0.1-predev.1",
"rollup": "^4.9.6",
"rollup-plugin-filesize": "^10.0.0",
"rollup-plugin-terser": "^7.0.2",
"testdouble": "^3.16.8",
"trash-cli": "^5.0.0",
"ts-jest": "^29.0.5",
Expand Down
30 changes: 30 additions & 0 deletions lib/reactotron-apollo-client/rollup.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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/reactotron-apollo-client.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(),
],
external: ["@apollo/client", "reactotron-core-client", "graphql"],
}
41 changes: 0 additions & 41 deletions lib/reactotron-apollo-client/rollup.config.ts

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/generate-plugin.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fs.writeFileSync(
);

fs.writeFileSync(
path.join(targetDir, `rollup.config.ts`),
path.join(targetDir, `rollup.config.cjs`),
createTemplateRollupConfig({ pluginName })
);

Expand Down
Loading

0 comments on commit 6c40099

Please sign in to comment.