Skip to content

Commit 3ce4d78

Browse files
committed
Webpack friendly (microsoft#57679)
1 parent 84cd128 commit 3ce4d78

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

extensions/extension-editing/src/extensionLinter.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import * as path from 'path';
7+
import * as fs from 'fs';
78

89
import * as nls from 'vscode-nls';
910
const localize = nls.loadMessageBundle();
1011

1112
import { parseTree, findNodeAtLocation, Node as JsonNode } from 'jsonc-parser';
1213
import * as MarkdownItType from 'markdown-it';
1314

14-
import { languages, workspace, Disposable, TextDocument, Uri, Diagnostic, Range, DiagnosticSeverity, Position } from 'vscode';
15+
import { languages, workspace, Disposable, TextDocument, Uri, Diagnostic, Range, DiagnosticSeverity, Position, env } from 'vscode';
1516

16-
const product = require('../../../product.json');
17+
const product = JSON.parse(fs.readFileSync(path.join(env.appRoot, 'product.json'), { encoding: 'utf-8' }));
1718
const allowedBadgeProviders: string[] = (product.extensionAllowedBadgeProviders || []).map(s => s.toLowerCase());
1819

1920
const httpsRequired = localize('httpsRequired', "Images must use the HTTPS protocol.");

0 commit comments

Comments
 (0)