Browse Source

Fixes github code splitting

main
Eric Amodio 3 years ago
parent
commit
c4f078d1b6
3 changed files with 14 additions and 6 deletions
  1. +1
    -1
      src/git/remotes/github.ts
  2. +5
    -5
      src/github/github.ts
  3. +8
    -0
      webpack.config.js

+ 1
- 1
src/git/remotes/github.ts View File

@ -3,7 +3,6 @@ import { AuthenticationSession, Range, Uri } from 'vscode';
import { DynamicAutolinkReference } from '../../annotations/autolinks';
import { AutolinkReference } from '../../config';
import { Container } from '../../container';
import { GitHubPullRequest } from '../../github/github';
import {
Account,
DefaultBranch,
@ -240,6 +239,7 @@ export class GitHubRemote extends RichRemoteProvider {
const [owner, repo] = this.splitPath();
const { include, ...opts } = options ?? {};
const GitHubPullRequest = (await import('../../github/github')).GitHubPullRequest;
return (await Container.instance.github)?.getPullRequestForBranch(this, accessToken, owner, repo, branch, {
...opts,
include: include?.map(s => GitHubPullRequest.toState(s)),

+ 5
- 5
src/github/github.ts View File

@ -1,14 +1,14 @@
'use strict';
import { graphql } from '@octokit/graphql';
import {
DefaultBranch,
IssueOrPullRequest,
IssueOrPullRequestType,
type DefaultBranch,
type IssueOrPullRequest,
type IssueOrPullRequestType,
PullRequest,
PullRequestState,
} from '../git/models';
import { Account } from '../git/models/author';
import { AuthenticationError, ClientError, RichRemoteProvider } from '../git/remotes/provider';
import type { Account } from '../git/models/author';
import { AuthenticationError, ClientError, type RichRemoteProvider } from '../git/remotes/provider';
import { Logger } from '../logger';
import { debug } from '../system';

+ 8
- 0
webpack.config.js View File

@ -142,6 +142,14 @@ function getExtensionConfig(target, mode, env) {
},
}),
],
splitChunks: {
// Disable all non-async code splitting
chunks: () => false,
cacheGroups: {
default: false,
vendors: false,
},
},
},
externals: {
vscode: 'commonjs vscode',

||||||
x
 
000:0
Loading…
Cancel
Save