From cdb399295b3de1f3ad8dbed6ca1f7e98bd5f4a3a Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 22 May 2017 09:16:56 +0200 Subject: [PATCH] Don't snapshot the `iconv-lite` module When deciding which methods to export, `iconv-lite` verifies the availability of some Node features, which is clearly an unsupported behavior when executing it via `mksnapshot`. In this case we were not getting any exception at compile-time, but we noticed some methods were missing from iconv-lite's API. With this commit we are excluding this module from the snapshot, thus making all of its methods available again. --- script/lib/generate-startup-snapshot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/lib/generate-startup-snapshot.js b/script/lib/generate-startup-snapshot.js index 95b5f7f8f..23ad0eb9d 100644 --- a/script/lib/generate-startup-snapshot.js +++ b/script/lib/generate-startup-snapshot.js @@ -46,7 +46,7 @@ module.exports = function (packagedAppPath) { relativePath == path.join('..', 'node_modules', 'markdown-preview', 'node_modules', 'htmlparser2', 'lib', 'index.js') || relativePath == path.join('..', 'node_modules', 'roaster', 'node_modules', 'htmlparser2', 'lib', 'index.js') || relativePath == path.join('..', 'node_modules', 'task-lists', 'node_modules', 'htmlparser2', 'lib', 'index.js') || - relativePath == path.join('..', 'node_modules', 'iconv-lite', 'encodings', 'index.js') || + relativePath == path.join('..', 'node_modules', 'iconv-lite', 'lib', 'index.js') || relativePath == path.join('..', 'node_modules', 'less', 'index.js') || relativePath == path.join('..', 'node_modules', 'less', 'lib', 'less', 'fs.js') || relativePath == path.join('..', 'node_modules', 'less', 'lib', 'less-node', 'index.js') ||