mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-07-09 17:28:58 +00:00
Add VSCode extension providing sidebar-based AI code review integration, including CLI/Git/Config services, webview UI with file diff viewer, inline comment provider, and comprehensive test coverage. Fix 9 Dependabot security vulnerabilities by adding yarn resolutions for undici, form-data, js-yaml, and minimatch. Co-authored-by: lizhengfeng <lizhengfeng.lzf@alibaba-inc.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
50 lines
1.2 KiB
JavaScript
50 lines
1.2 KiB
JavaScript
const path = require('path');
|
|
|
|
/** @type {import('webpack').Configuration} */
|
|
const extensionConfig = {
|
|
name: 'extension',
|
|
target: 'node',
|
|
entry: { extension: './src/extension/extension.ts' },
|
|
output: {
|
|
path: path.resolve(__dirname, 'out'),
|
|
filename: '[name].js',
|
|
libraryTarget: 'commonjs2',
|
|
},
|
|
externals: { vscode: 'commonjs vscode' },
|
|
resolve: { extensions: ['.ts', '.js'] },
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.ts$/,
|
|
exclude: /node_modules/,
|
|
use: { loader: 'ts-loader', options: { configFile: 'tsconfig.extension.json' } },
|
|
},
|
|
],
|
|
},
|
|
devtool: 'source-map',
|
|
};
|
|
|
|
/** @type {import('webpack').Configuration} */
|
|
const webviewConfig = {
|
|
name: 'webview',
|
|
target: 'web',
|
|
entry: { webview: './src/webview/index.tsx' },
|
|
output: {
|
|
path: path.resolve(__dirname, 'out'),
|
|
filename: '[name].js',
|
|
},
|
|
resolve: { extensions: ['.ts', '.tsx', '.js'] },
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
exclude: /node_modules/,
|
|
use: { loader: 'ts-loader', options: { configFile: 'tsconfig.webview.json' } },
|
|
},
|
|
{ test: /\.css$/, use: ['style-loader', 'css-loader'] },
|
|
],
|
|
},
|
|
devtool: 'source-map',
|
|
};
|
|
|
|
module.exports = [extensionConfig, webviewConfig];
|