mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Only use string of the remote/web/package.json browser field (#165163)
fix(build): Close #165162, only use string of the package.json `browser` field
This commit is contained in:
@@ -371,7 +371,8 @@ export function acquireWebNodePaths() {
|
||||
for (const key of Object.keys(webPackages)) {
|
||||
const packageJSON = path.join(root, 'node_modules', key, 'package.json');
|
||||
const packageData = JSON.parse(fs.readFileSync(packageJSON, 'utf8'));
|
||||
let entryPoint: string = packageData.browser ?? packageData.main;
|
||||
// Only cases where the browser is a string are handled
|
||||
let entryPoint: string = typeof packageData.browser === 'string' ? packageData.browser : packageData.main;
|
||||
|
||||
// On rare cases a package doesn't have an entrypoint so we assume it has a dist folder with a min.js
|
||||
if (!entryPoint) {
|
||||
|
||||
Reference in New Issue
Block a user