mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
fixes #78159
This commit is contained in:
@@ -30,11 +30,20 @@ const sourceMappingURLBase = `https://ticino.blob.core.windows.net/sourcemaps/${
|
||||
|
||||
function fromLocal(extensionPath: string): Stream {
|
||||
const webpackFilename = path.join(extensionPath, 'extension.webpack.config.js');
|
||||
if (fs.existsSync(webpackFilename)) {
|
||||
return fromLocalWebpack(extensionPath);
|
||||
} else {
|
||||
return fromLocalNormal(extensionPath);
|
||||
}
|
||||
const input = fs.existsSync(webpackFilename)
|
||||
? fromLocalWebpack(extensionPath)
|
||||
: fromLocalNormal(extensionPath);
|
||||
|
||||
const tmLanguageJsonFilter = filter('**/*.tmLanguage.json', { restore: true });
|
||||
|
||||
return input
|
||||
.pipe(tmLanguageJsonFilter)
|
||||
.pipe(buffer())
|
||||
.pipe(es.mapSync((f: File) => {
|
||||
f.contents = Buffer.from(JSON.stringify(JSON.parse(f.contents.toString('utf8'))));
|
||||
return f;
|
||||
}))
|
||||
.pipe(tmLanguageJsonFilter.restore);
|
||||
}
|
||||
|
||||
function fromLocalWebpack(extensionPath: string): Stream {
|
||||
|
||||
Reference in New Issue
Block a user