diff --git a/src/webviews/apps/tsconfig.json b/src/webviews/apps/tsconfig.json index 8588e19..7014f36 100644 --- a/src/webviews/apps/tsconfig.json +++ b/src/webviews/apps/tsconfig.json @@ -3,6 +3,9 @@ "compilerOptions": { "lib": ["dom", "dom.iterable", "es2020"], "outDir": "../../", + "paths": { + "@env/*": ["src/env/browser/*"] + }, "useDefineForClassFields": false }, "include": [ diff --git a/src/webviews/commitDetails/protocol.ts b/src/webviews/commitDetails/protocol.ts index 891f2cb..bd878e1 100644 --- a/src/webviews/commitDetails/protocol.ts +++ b/src/webviews/commitDetails/protocol.ts @@ -1,5 +1,6 @@ import { TextDocumentShowOptions } from 'vscode'; import type { IssueOrPullRequest } from '../../git/models/issue'; +import type { PullRequest } from '../../git/models/pullRequest'; import { IpcCommandType, IpcNotificationType } from '../protocol'; export type FileShowOptions = TextDocumentShowOptions; @@ -21,7 +22,7 @@ export type CommitDetails = { export type RichCommitDetails = { formattedMessage?: string; - pullRequest?: IssueOrPullRequest; + pullRequest?: PullRequest; issues?: IssueOrPullRequest[]; }; diff --git a/webpack.config.js b/webpack.config.js index f33d2d4..12d8fc0 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -410,6 +410,9 @@ function getWebviewsConfig(mode, env) { ], }, resolve: { + alias: { + '@env': path.resolve(__dirname, 'src', 'env', 'browser'), + }, extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'], modules: [basePath, 'node_modules'], },