mirror of
https://github.com/microsoft/vscode.git
synced 2026-10-05 15:36:22 +01:00
Revert "fix: store node_modules at top level inside asar archive"
This reverts commit 4747aa5e375cc1fe49b8eb510dd1acec1fd6a581.
This commit is contained in:
1 file changed
+2
-6
+2
-6
@@ -109,15 +109,11 @@ export function createAsar(folderPath: string, unpackGlobs: string[], skipGlobs:
|
||||
}));
|
||||
}
|
||||
const shouldUnpack = shouldUnpackFile(file);
|
||||
// Strip the `node_modules/` prefix so that modules live at the top level
|
||||
// of the archive (`node_modules.asar/<module>`), matching both the
|
||||
// `node_modules.asar.unpacked/<module>` layout and how the archive is
|
||||
// referenced at runtime. This keeps a single, consistent top-level layout.
|
||||
const relative = path.relative(folderPath, file.path);
|
||||
insertFile(relative, { size: file.contents.length, mode: file.stat.mode }, shouldUnpack);
|
||||
insertFile(file.relative, { size: file.contents.length, mode: file.stat.mode }, shouldUnpack);
|
||||
|
||||
if (shouldUnpack) {
|
||||
// The file goes outside of xx.asar, in a folder xx.asar.unpacked
|
||||
const relative = path.relative(folderPath, file.path);
|
||||
this.queue(new VinylFile({
|
||||
base: '.',
|
||||
path: path.join(destFilename + '.unpacked', relative),
|
||||
|
||||
Reference in new issue
Block a user