提交 2c531e2e 编写于 作者: J Johannes Rieken

only set nodeCachedData-prop when having a dir, #60332

上级 2319dc23
......@@ -41,12 +41,14 @@ exports.load = function (entrypoint, onLoad, onError) {
}
// cached data config
loader.config({
nodeCachedData: {
path: process.env['VSCODE_NODE_CACHED_DATA_DIR'],
seed: entrypoint
}
});
if (process.env['VSCODE_NODE_CACHED_DATA_DIR']) {
loader.config({
nodeCachedData: {
path: process.env['VSCODE_NODE_CACHED_DATA_DIR'],
seed: entrypoint
}
});
}
onLoad = onLoad || function () { };
onError = onError || function (err) { console.error(err); };
......
......@@ -91,13 +91,17 @@ exports.load = function (modulePaths, resultCallback, options) {
const loaderConfig = {
baseUrl: bootstrap.uriFromPath(configuration.appRoot) + '/out',
'vs/nls': nlsConfig,
nodeCachedData: {
path: configuration.nodeCachedDataDir,
seed: modulePaths.join('')
},
nodeModules: [/*BUILD->INSERT_NODE_MODULES*/]
};
// cached data config
if (configuration.nodeCachedDataDir) {
loaderConfig.nodeCachedData = {
path: configuration.nodeCachedDataDir,
seed: modulePaths.join('')
};
}
if (options && typeof options.beforeLoaderConfig === 'function') {
options.beforeLoaderConfig(configuration, loaderConfig);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册