mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
Minor tweaks
This commit is contained in:
@@ -39,10 +39,12 @@ function fromLocalWebpack(extensionPath: string, sourceMappingURLBase: string |
|
||||
|
||||
const packagedDependencies: string[] = [];
|
||||
const packageJsonConfig = require(path.join(extensionPath, 'package.json'));
|
||||
const webpackRootConfig = require(path.join(extensionPath, 'extension.webpack.config.js'));
|
||||
for (const key in webpackRootConfig.externals) {
|
||||
if (key in packageJsonConfig.dependencies) {
|
||||
packagedDependencies.push(key);
|
||||
if (Array.isArray(packageJsonConfig.dependencies)) {
|
||||
const webpackRootConfig = require(path.join(extensionPath, 'extension.webpack.config.js'));
|
||||
for (const key in webpackRootConfig.externals) {
|
||||
if (key in packageJsonConfig.dependencies) {
|
||||
packagedDependencies.push(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,8 +82,10 @@ function fromLocalWebpack(extensionPath: string, sourceMappingURLBase: string |
|
||||
.pipe(packageJsonFilter)
|
||||
.pipe(buffer())
|
||||
.pipe(json((data: any) => {
|
||||
// hardcoded entry point directory!
|
||||
data.main = data.main.replace('/out/', /dist/);
|
||||
if (data.main) {
|
||||
// hardcoded entry point directory!
|
||||
data.main = data.main.replace('/out/', /dist/);
|
||||
}
|
||||
return data;
|
||||
}))
|
||||
.pipe(packageJsonFilter.restore);
|
||||
|
||||
Reference in New Issue
Block a user