Skip to content

Commit 872d0f0

Browse files
committed
Migrate build tool configuration from RSBuild to Webpack across applications
- revert all those lint fixes [Changes] ├── apps │ ├── browser │ │ ├── create-firefox-build.ts │ │ ├── create-zip-archives.ts │ │ ├── package.json │ │ ├── src │ │ │ └── views │ │ │ └── popup │ │ │ └── index.html │ │ ├── tsconfig.json │ │ └── webpack.config.ts │ ├── editor │ │ ├── .vscodeignore │ │ ├── package.json │ │ ├── src │ │ │ ├── commands │ │ │ │ ├── apply-response-command │ │ │ │ │ ├── response-processor │ │ │ │ │ │ ├── handlers │ │ │ │ │ │ │ ├── patch-repair-handler.ts │ │ │ │ │ │ │ ├── restore-preview-handler.ts │ │ │ │ │ │ │ ├── search-replace-handler.ts │ │ │ │ │ │ │ └── truncated-handler.ts │ │ │ │ │ │ └── response-processor.ts │ │ │ │ │ └── utils │ │ │ │ │ ├── file-operations │ │ │ │ │ │ ├── prepare-rename-operation.ts │ │ │ │ │ │ └── read-rename-source-file.ts │ │ │ │ │ └── preview │ │ │ │ │ ├── build-history-files.ts │ │ │ │ │ ├── file-preparer.ts │ │ │ │ │ ├── vscode-ui.ts │ │ │ │ │ └── workspace-listener.ts │ │ │ │ ├── copy-merge-commit-details-command.ts │ │ │ │ ├── generate-commit-message-commands │ │ │ │ │ └── utils │ │ │ │ │ └── build-commit-message-prompt.ts │ │ │ │ ├── history-command │ │ │ │ │ ├── actions │ │ │ │ │ │ └── restore-checkpoint.ts │ │ │ │ │ └── utils │ │ │ │ │ └── sync-directory.ts │ │ │ │ ├── new-folder-command.ts │ │ │ │ ├── search-files-commands │ │ │ │ │ └── utils │ │ │ │ │ └── get-target-folder-path.ts │ │ │ │ ├── select-files-of-commit-command.ts │ │ │ │ └── set-ranges-command.ts │ │ │ ├── context │ │ │ │ └── providers │ │ │ │ └── workspace │ │ │ │ └── workspace-provider.ts │ │ │ ├── features │ │ │ │ ├── checkpoints │ │ │ │ │ └── utils │ │ │ │ │ ├── copy-optimised-recursively.ts │ │ │ │ │ └── git-utils.ts │ │ │ │ └── search-files │ │ │ │ └── utils │ │ │ │ └── analyze-files.ts │ │ │ ├── services │ │ │ │ ├── websocket-manager.ts │ │ │ │ └── websocket-server-process.ts │ │ │ ├── utils │ │ │ │ ├── agentic-cli-invocation │ │ │ │ │ ├── invoke-agentic-cli.ts │ │ │ │ │ └── utils │ │ │ │ │ └── check-command-exists.ts │ │ │ │ ├── git-repository-utils.ts │ │ │ │ └── path-sanitizer.ts │ │ │ └── views │ │ │ ├── prompt │ │ │ │ └── backend │ │ │ │ ├── message-handlers │ │ │ │ │ ├── handle-paste-url.ts │ │ │ │ │ ├── handle-patch-repair.ts │ │ │ │ │ ├── handle-preview-generated-code.ts │ │ │ │ │ └── utils │ │ │ │ │ └── build-cli-prompt.ts │ │ │ │ └── utils │ │ │ │ ├── persistent-text-storage.ts │ │ │ │ ├── preview-text-in-temp-file.ts │ │ │ │ ├── symbols │ │ │ │ │ ├── fragment │ │ │ │ │ │ └── replace-fragment-symbol.ts │ │ │ │ │ ├── image │ │ │ │ │ │ └── replace-image-symbol.ts │ │ │ │ │ ├── pasted-text │ │ │ │ │ │ └── replace-pasted-text-symbol.ts │ │ │ │ │ └── website │ │ │ │ │ └── replace-website-symbol.ts │ │ │ │ └── website-fetcher.ts │ │ │ ├── settings │ │ │ │ └── backend │ │ │ │ └── message-handlers │ │ │ │ ├── add-provider │ │ │ │ │ └── pick-extended-provider.ts │ │ │ │ ├── handle-open-allow-patterns-settings.ts │ │ │ │ └── handle-open-ignore-patterns-settings.ts │ │ │ └── shared │ │ │ └── utils │ │ │ └── hash-sign-quick-pick │ │ │ └── symbols │ │ │ ├── changes-symbol.ts │ │ │ ├── commit-symbol.ts │ │ │ └── saved-context-symbol.ts │ │ ├── tsconfig.json │ │ └── webpack.config.ts │ └── web │ └── package.json ├── package.json ├── packages │ ├── shared │ │ └── tsconfig.json │ └── ui │ ├── package.json │ ├── src │ │ └── components │ │ └── editor │ │ └── common │ │ └── Icon │ │ └── Icon.tsx │ └── tsconfig.json ├── pnpm-workspace.yaml └── tsconfig.json
1 parent 4b999b0 commit 872d0f0

24 files changed

Lines changed: 2649 additions & 1834 deletions

‎apps/browser/create-firefox-build.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import * as fs from 'fs'
22
import * as path from 'path'
3-
import { fileURLToPath } from 'url'
4-
5-
const __dirname = path.dirname(fileURLToPath(import.meta.url))
63

74
const manifest_path = path.join(__dirname, 'src', 'manifest.json')
85
const manifest = JSON.parse(fs.readFileSync(manifest_path, 'utf8'))

‎apps/browser/create-zip-archives.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import * as fs from 'fs'
22
import * as path from 'path'
33
import archiver from 'archiver'
4-
import { fileURLToPath } from 'url'
5-
6-
const __dirname = path.dirname(fileURLToPath(import.meta.url))
74

85
const get_version = (): string => {
96
const manifest_path = path.join(__dirname, 'src', 'manifest.json')

‎apps/browser/package.json‎

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
{
22
"name": "gemini-coder-connector",
3-
"type": "module",
43
"scripts": {
5-
"build": "rsbuild build && node --experimental-strip-types create-firefox-build.ts && node --experimental-strip-types create-zip-archives.ts",
4+
"build": "webpack --mode production && ts-node create-firefox-build.ts && ts-node create-zip-archives.ts",
65
"lint": "eslint src --ext ts,tsx",
76
"lint:fix": "eslint src --ext ts,tsx --fix"
87
},
98
"devDependencies": {
109
"@pmmmwh/react-refresh-webpack-plugin": "^0.6.1",
11-
"@rsbuild/core": "^1.1.12",
12-
"@rsbuild/plugin-react": "^1.0.6",
13-
"@rsbuild/plugin-sass": "^1.1.2",
14-
"@rsbuild/plugin-svgr": "^1.0.1",
15-
"@rsbuild/plugin-type-check": "^1.1.1",
10+
"@svgr/webpack": "^8.1.0",
1611
"@types/archiver": "^6.0.3",
1712
"@types/jest": "^29.5.14",
1813
"@types/node": "20.x",
@@ -21,12 +16,24 @@
2116
"@typescript-eslint/parser": "^8.54.0",
2217
"archiver": "^6.0.1",
2318
"baseline-browser-mapping": "^2.9.19",
19+
"clean-webpack-plugin": "^4.0.0",
20+
"copy-webpack-plugin": "^12.0.2",
21+
"css-loader": "^6.8.1",
2422
"eslint": "^8.57.1",
2523
"eslint-config-prettier": "^10.1.8",
2624
"eslint-plugin-react": "^7.37.5",
25+
"mini-css-extract-plugin": "^2.9.4",
2726
"react-refresh": "^0.17.0",
2827
"sass": "^1.93.2",
29-
"webextension-polyfill": "^0.12.0"
28+
"sass-loader": "^13.3.3",
29+
"style-loader": "^3.3.3",
30+
"ts-node": "^10.9.2",
31+
"ts-loader": "^9.5.4",
32+
"typescript": "^5.9.3",
33+
"webextension-polyfill": "^0.12.0",
34+
"webpack": "^5.102.0",
35+
"webpack-cli": "^5.1.4",
36+
"webpack-dev-server": "^5.2.2"
3037
},
3138
"dependencies": {
3239
"@types/chrome": "^0.1.16",
@@ -35,6 +42,7 @@
3542
"@types/webextension-polyfill": "^0.12.4",
3643
"classnames": "^2.5.1",
3744
"react": "^18.2.0",
38-
"react-dom": "^18.2.0"
45+
"react-dom": "^18.2.0",
46+
"tsconfig-paths-webpack-plugin": "^4.2.0"
3947
}
4048
}

‎apps/browser/rsbuild.config.ts‎

Lines changed: 0 additions & 43 deletions
This file was deleted.

‎apps/browser/src/views/popup/index.html‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
content="width=device-width, initial-scale=1.0, user-scalable=no"
88
/>
99
<link rel="stylesheet" href="index.css" />
10+
<link rel="stylesheet" href="popup.css" />
1011
</head>
1112
<body>
1213
<div id="root"></div>
14+
<script src="popup.js"></script>
1315
</body>
1416
</html>

‎apps/browser/tsconfig.json‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
"compilerOptions": {
33
"target": "ESNext",
44
"lib": ["dom", "ESNext"],
5-
"module": "ESNext",
6-
"noEmit": true,
7-
"rootDir": "../..",
5+
"module": "commonjs",
6+
"outDir": "out",
7+
"sourceMap": true,
88
"esModuleInterop": true,
9+
"baseUrl": ".",
910
"strict": true,
1011
"jsx": "react-jsx",
1112
"types": ["chrome", "webextension-polyfill", "node", "jest"],

‎apps/browser/webpack.config.ts‎

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import * as path from 'path'
2+
import * as webpack from 'webpack'
3+
import CopyWebpackPlugin from 'copy-webpack-plugin'
4+
import { CleanWebpackPlugin } from 'clean-webpack-plugin'
5+
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'
6+
import MiniCssExtractPlugin from 'mini-css-extract-plugin'
7+
import 'webpack-dev-server'
8+
9+
const config = (_: any, argv: Record<string, any>): webpack.Configuration => {
10+
const is_production = argv.mode === 'production'
11+
12+
const plugins: webpack.WebpackPluginInstance[] = [
13+
new MiniCssExtractPlugin({
14+
filename: '[name].css'
15+
}) as unknown as webpack.WebpackPluginInstance,
16+
new CopyWebpackPlugin({
17+
patterns: [
18+
{ from: 'src/manifest.json', to: 'manifest.json' },
19+
{ from: 'src/icons', to: 'icons' },
20+
{ from: 'src/fonts', to: 'fonts' },
21+
{ from: 'src/views/popup/index.html', to: 'popup.html' },
22+
{ from: 'src/views/popup/index.css', to: 'index.css' }
23+
]
24+
})
25+
]
26+
27+
if (is_production) {
28+
plugins.push(new CleanWebpackPlugin())
29+
}
30+
31+
return {
32+
entry: {
33+
'send-prompt-content-script':
34+
'./src/content-scripts/send-prompt-content-script/send-prompt-content-script.ts',
35+
background: './src/background/main.ts',
36+
popup: './src/views/popup/App.tsx'
37+
},
38+
output: {
39+
path: path.resolve(__dirname, 'dist'),
40+
filename: '[name].js'
41+
},
42+
cache: {
43+
type: 'filesystem',
44+
buildDependencies: {
45+
config: [__filename]
46+
}
47+
},
48+
module: {
49+
rules: [
50+
{
51+
test: /\.(ts|tsx)$/,
52+
use: 'ts-loader',
53+
exclude: /node_modules/
54+
},
55+
{
56+
test: /\.css$/,
57+
use: [MiniCssExtractPlugin.loader, 'css-loader']
58+
},
59+
{
60+
test: /\.scss$/,
61+
use: [
62+
MiniCssExtractPlugin.loader,
63+
{
64+
loader: 'css-loader',
65+
options: {
66+
modules: {
67+
localIdentName: '[name]__[local]__[hash:base64:5]'
68+
},
69+
importLoaders: 1
70+
}
71+
},
72+
'sass-loader'
73+
]
74+
}
75+
]
76+
},
77+
resolve: {
78+
extensions: ['.ts', '.tsx', '.js', '.jsx'],
79+
plugins: [new TsconfigPathsPlugin() as any]
80+
},
81+
plugins,
82+
stats: 'errors-warnings'
83+
}
84+
}
85+
86+
export default config

‎apps/editor/.vscodeignore‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ src
22
.gitignore
33
tsconfig.json
44
__mocks__
5-
jest.config.js
6-
rsbuild.config.ts
5+
jest.config.js

‎apps/editor/package.json‎

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"name": "gemini-coder",
33
"displayName": "Code Web Chat",
44
"description": "CWC makes AI coding blazing fast!",
5-
"version": "2026.1028.303",
5+
"version": "2026.1028.300",
66
"scripts": {
7-
"build": "npx rimraf *.vsix && npx vsce package --no-dependencies",
8-
"vscode:prepublish": "npm run compile",
9-
"compile": "NODE_OPTIONS=--disable-warning=MODULE_TYPELESS_PACKAGE_JSON rsbuild build",
10-
"watch": "NODE_OPTIONS=--disable-warning=MODULE_TYPELESS_PACKAGE_JSON rsbuild build --watch",
7+
"build": "npx vsce package --no-dependencies",
8+
"vscode:prepublish": "rimraf out && npm run compile",
9+
"compile": "webpack --config ./webpack.config.ts --mode production",
10+
"watch": "webpack --config ./webpack.config.ts --watch --mode development",
1111
"lint": "eslint src --ext ts,tsx",
1212
"lint:fix": "eslint src --ext ts,tsx --fix",
1313
"test": "jest",
@@ -1310,24 +1310,30 @@
13101310
"@types/vscode": "1.96.0",
13111311
"@types/ws": "^8.18.1",
13121312
"@types/turndown": "^5.0.5",
1313-
"@typescript-eslint/eslint-plugin": "^8.72.1",
1314-
"@typescript-eslint/parser": "^8.72.1",
1315-
"@rsbuild/core": "^1.1.12",
1316-
"@rsbuild/plugin-react": "^1.0.6",
1317-
"@rsbuild/plugin-sass": "^1.1.2",
1318-
"@rsbuild/plugin-svgr": "^1.0.1",
1319-
"@rsbuild/plugin-type-check": "^1.1.1",
1313+
"@typescript-eslint/eslint-plugin": "^7.18.0",
1314+
"@typescript-eslint/parser": "^7.18.0",
1315+
"clean-webpack-plugin": "^4.0.0",
1316+
"copy-webpack-plugin": "^12.0.2",
1317+
"css-loader": "^6.5.1",
13201318
"eslint": "^8.57.1",
13211319
"eslint-config-prettier": "^10.1.5",
1320+
"esbuild-loader": "^4.2.2",
13221321
"eslint-plugin-react": "^7.37.5",
1322+
"fork-ts-checker-webpack-plugin": "^9.0.2",
1323+
"mini-css-extract-plugin": "^2.9.2",
13231324
"sass-embedded": "^1.89.2",
1325+
"sass-loader": "^12.6.0",
1326+
"style-loader": "^3.3.4",
1327+
"ts-node": "^10.9.2",
13241328
"typed-css-modules": "^0.9.1",
1325-
"typescript": "^6.x"
1329+
"webpack": "^5.109.2",
1330+
"webpack-cli": "^6.0.1"
13261331
},
13271332
"dependencies": {
13281333
"@joplin/turndown": "^4.0.81",
13291334
"@joplin/turndown-plugin-gfm": "^1.0.63",
13301335
"@mozilla/readability": "^0.6.0",
1336+
"@svgr/webpack": "^8.1.0",
13311337
"@vscode/codicons": "^0.0.46-38",
13321338
"axios": "^1.18.1",
13331339
"bufferutil": "^4.0.9",

0 commit comments

Comments
 (0)