Skip to content

Commit

Permalink
feat: performance improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
vacekj committed Feb 9, 2024
1 parent 8def128 commit 0b71edf
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ dist/
coverage/
.eslintcache

bun.lockb
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@
"overrides": {
"webpack": "^5"
}
}
},
"workspaces": ["packages/*"]
}
3 changes: 2 additions & 1 deletion packages/builder/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"sourceMap": true
"sourceMap": true,
"incremental": true
},
"include": ["src", "craco.config.js", ".eslintrc.js"]
}
1 change: 1 addition & 0 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"test": "vitest --run",
"prepare": "tsc",
"dev:fast": "esbuild src/**/*.ts src/**/*.tsx src/*.ts src/*.tsx --outdir=dist --watch",
"build": "tsc",
"dev": "tsc --watch",
"typecheck": "tsc --noEmit",
Expand Down
3 changes: 2 additions & 1 deletion packages/common/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"isolatedModules": true,
"jsx": "react-jsx",
"sourceMap": true,
"declaration": true
"declaration": true,
"incremental": true
},
}
1 change: 1 addition & 0 deletions packages/data-layer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"types": "dist/index.d.ts",
"scripts": {
"dev": "tsc --watch",
"start": "node -r dotenv-flow/config dist/index.js",
"lint": "eslint --cache --max-warnings=0",
"lint:fix": "eslint --cache --max-warnings=0 --fix",
"lint:all:fix": "eslint --fix --cache --max-warnings=0 src",
Expand Down
3 changes: 2 additions & 1 deletion packages/data-layer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"outDir": "dist",
"declaration": true,
"sourceMap": true,
"jsx": "react-jsx"
"jsx": "react-jsx",
"incremental": true
},
"include": ["src/**/*"]
}
3 changes: 2 additions & 1 deletion packages/grant-explorer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"noEmit": true,
"jsx": "react-jsx",
"sourceMap": true,
"types": ["vitest/globals", "@testing-library/jest-dom"]
"types": ["vitest/globals", "@testing-library/jest-dom"],
"incremental": true
},
"include": ["src"]
}
6 changes: 6 additions & 0 deletions packages/round-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@
"html-react-parser": "^3.0.7",
"https-browserify": "^1.0.0",
"jest-fetch-mock": "^3.0.3",
"jszip": "^3.10.1",
"lit-js-sdk-old-w-pgn": "^1.1.256",
"localforage": "^1.10.0",
"lodash": "^4.17.21",
"moment": "^2.29.3",
"os-browserify": "^0.3.0",
Expand Down Expand Up @@ -124,6 +126,10 @@
"devDependencies": {
"@faker-js/faker": "^7.4.0",
"@gitcoinco/passport-sdk-types": "^0.1.2",
"@rsbuild/core": "^0.4.1",
"@rsbuild/plugin-react": "^0.3.11",
"@rsbuild/plugin-svgr": "^0.3.11",
"@rsdoctor/rspack-plugin": "^0.1.1",
"@playwright/test": "^1.41.1",
"@synthetixio/synpress": "3.7.2-beta.10",
"@tailwindcss/line-clamp": "^0.4.0",
Expand Down
40 changes: 40 additions & 0 deletions packages/round-manager/rsbuild.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { defineConfig, loadEnv } from "@rsbuild/core";
import { pluginReact } from "@rsbuild/plugin-react";
import { pluginSvgr } from "@rsbuild/plugin-svgr";
import { RsdoctorRspackPlugin } from "@rsdoctor/rspack-plugin";
import path = require("path");

const { publicVars } = loadEnv({ prefixes: ["REACT_APP_"] });

export default defineConfig({
plugins: [pluginReact(), pluginSvgr()],
html: {
template: "./public/index.html",
},
server: {
port: Number(process.env.PORT) || 3000,
},
source: {
define: publicVars,
alias: {
localforage: path.resolve(
__dirname,
"./node_modules/localforage/src/localforage.js"
),
jszip: path.resolve(__dirname, "./node_modules/jszip/lib/index.js"),
"readable-stream": require.resolve("readable-stream"),
},
},
tools: {
rspack(config, { appendPlugins }) {
// Only register the plugin when RSDOCTOR is true, as the plugin will increase the build time.
if (process.env.RSDOCTOR) {
appendPlugins(
new RsdoctorRspackPlugin({
// plugin options
})
);
}
},
},
});
2 changes: 1 addition & 1 deletion packages/round-manager/src/features/api/exports.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { stringify as stringifyCsv } from "csv-stringify";
import { stringify as stringifyCsv } from "csv-stringify/browser/esm";
import { Lit } from "./lit";
import { Application } from "allo-indexer-client";

Expand Down
3 changes: 2 additions & 1 deletion packages/round-manager/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"types": ["@testing-library/jest-dom", "jest", "node"]
"types": ["@testing-library/jest-dom", "jest", "node"],
"incremental": true
},
"include": ["src"]
}

0 comments on commit 0b71edf

Please sign in to comment.