Skip to content

Commit

Permalink
chore: Use ts incremental
Browse files Browse the repository at this point in the history
  • Loading branch information
memoyil committed Jan 9, 2025
1 parent f26fb49 commit c8d3d81
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 397 deletions.
19 changes: 2 additions & 17 deletions apps/web/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -218,21 +218,6 @@ const config = {
]
},
webpack: (webpackConfig, { webpack, isServer }) => {
webpackConfig.module.rules = webpackConfig.module.rules.map((rule) => {
if (rule.test?.toString().includes('tsx|ts|js|mjs|jsx')) {
return {
...rule,
use: {
loader: 'esbuild-loader',
options: {
loader: 'tsx',
target: 'es2020',
},
},
};
}
return rule;
});
// tree shake sentry tracing
webpackConfig.plugins.push(
new webpack.DefinePlugin({
Expand All @@ -251,14 +236,14 @@ const config = {
maxRetries: 5,
}),
)
webpackConfig.optimization.minimize=true
webpackConfig.optimization.minimize = true
webpackConfig.optimization.minimizer = [
new TerserPlugin({
parallel: true,
minify: TerserPlugin.esbuildMinify,
terserOptions: {},
}),
];
]
if (!isServer && webpackConfig.optimization.splitChunks) {
// webpack doesn't understand worker deps on quote worker, so we need to manually add them
// https://github.com/webpack/webpack/issues/16895
Expand Down
4 changes: 1 addition & 3 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"test": "LC_ALL=\"en_US.UTF-8\" vitest --run",
"test:watch": "LC_ALL=\"en_US.UTF-8\" vitest --watch",
"test:config": "vitest --run --config vitest-config-test.config.ts",
"lint": "eslint_d --cache 'src/**/*.{js,jsx,ts,tsx}'",
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
"lint:style": "npx stylelint '**/*.{ts,tsx}'",
"format:write": "prettier --write \"**/*.{js,jsx,ts,tsx,json}\"",
"typechecks": "tsc --noEmit -p ./tsconfig.json"
Expand Down Expand Up @@ -178,8 +178,6 @@
"eslint": "^8.32.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-lodash": "^7.4.0",
"esbuild-loader": "4.2.2",
"eslint_d": "14.3.0",
"happy-dom": "^13.3.8",
"lint-staged": "^12.3.4",
"openapi-typescript": "7.0.0-rc.0",
Expand Down
1 change: 1 addition & 0 deletions apps/web/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "@pancakeswap/tsconfig/nextjs.json",
"compilerOptions": {
"incremental": true,
"baseUrl": "./",
"strictNullChecks": true,
"noImplicitAny": false,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"start": "turbo run start --filter=web",
"test:config": "pnpm turbo run test:config --filter=web...[HEAD^1]",
"test:ci": "pnpm turbo run test --filter=[HEAD^1]",
"lint": "turbo run lint --cache-workers=50",
"lint:report": "turbo run lint --log-prefix=none --cache-workers=50",
"lint": "turbo run lint",
"lint:report": "turbo run lint --log-prefix=none",
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json}\"",
"format:write": "prettier --write \"**/*.{js,jsx,ts,tsx,json}\"",
"format:check:staged": "lint-staged",
Expand Down
Loading

0 comments on commit c8d3d81

Please sign in to comment.