mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
fixes #78159
This commit is contained in:
@@ -29,12 +29,18 @@ const commit = util.getVersion(root);
|
||||
const sourceMappingURLBase = `https://ticino.blob.core.windows.net/sourcemaps/${commit}`;
|
||||
function fromLocal(extensionPath) {
|
||||
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) => {
|
||||
f.contents = Buffer.from(JSON.stringify(JSON.parse(f.contents.toString('utf8'))));
|
||||
return f;
|
||||
}))
|
||||
.pipe(tmLanguageJsonFilter.restore);
|
||||
}
|
||||
function fromLocalWebpack(extensionPath) {
|
||||
const result = es.through();
|
||||
|
||||
@@ -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