|
1 | | -// Copyright (c) Microsoft Corporation. All rights reserved. |
2 | | -// Licensed under the MIT License. |
3 | | -'use strict'; |
4 | | -Object.defineProperty(exports, "__esModule", { value: true }); |
5 | | -const glob = require("glob"); |
6 | | -const path = require("path"); |
7 | | -const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer"); |
8 | | -const constants_1 = require("../constants"); |
9 | | -exports.nodeModulesToExternalize = [ |
10 | | - 'unicode/category/Lu', |
11 | | - 'unicode/category/Ll', |
12 | | - 'unicode/category/Lt', |
13 | | - 'unicode/category/Lo', |
14 | | - 'unicode/category/Lm', |
15 | | - 'unicode/category/Nl', |
16 | | - 'unicode/category/Mn', |
17 | | - 'unicode/category/Mc', |
18 | | - 'unicode/category/Nd', |
19 | | - 'unicode/category/Pc', |
20 | | - '@jupyterlab/services', |
21 | | - 'azure-storage', |
22 | | - 'request', |
23 | | - 'request-progress', |
24 | | - 'source-map-support', |
25 | | - 'diff-match-patch', |
26 | | - 'sudo-prompt', |
27 | | - 'node-stream-zip', |
28 | | - 'xml2js', |
29 | | - 'vsls/vscode' |
30 | | -]; |
31 | | -function getDefaultPlugins(name) { |
32 | | - const plugins = []; |
33 | | - if (!constants_1.isCI) { |
34 | | - plugins.push(new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({ |
35 | | - analyzerMode: 'static', |
36 | | - reportFilename: `${name}.analyzer.html` |
37 | | - })); |
38 | | - } |
39 | | - return plugins; |
40 | | -} |
41 | | -exports.getDefaultPlugins = getDefaultPlugins; |
42 | | -function getListOfExistingModulesInOutDir() { |
43 | | - const outDir = path.join(constants_1.ExtensionRootDir, 'out', 'client'); |
44 | | - const files = glob.sync('**/*.js', { sync: true, cwd: outDir }); |
45 | | - return files.map(filePath => `./${filePath.slice(0, -3)}`); |
46 | | -} |
47 | | -exports.getListOfExistingModulesInOutDir = getListOfExistingModulesInOutDir; |
| 1 | +// Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | +// Licensed under the MIT License. |
| 3 | +'use strict'; |
| 4 | +Object.defineProperty(exports, "__esModule", { value: true }); |
| 5 | +const glob = require("glob"); |
| 6 | +const path = require("path"); |
| 7 | +const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer"); |
| 8 | +const constants_1 = require("../constants"); |
| 9 | +exports.nodeModulesToExternalize = [ |
| 10 | + 'unicode/category/Lu', |
| 11 | + 'unicode/category/Ll', |
| 12 | + 'unicode/category/Lt', |
| 13 | + 'unicode/category/Lo', |
| 14 | + 'unicode/category/Lm', |
| 15 | + 'unicode/category/Nl', |
| 16 | + 'unicode/category/Mn', |
| 17 | + 'unicode/category/Mc', |
| 18 | + 'unicode/category/Nd', |
| 19 | + 'unicode/category/Pc', |
| 20 | + '@jupyterlab/services', |
| 21 | + 'azure-storage', |
| 22 | + 'request', |
| 23 | + 'request-progress', |
| 24 | + 'source-map-support', |
| 25 | + 'diff-match-patch', |
| 26 | + 'sudo-prompt', |
| 27 | + 'node-stream-zip', |
| 28 | + 'xml2js', |
| 29 | + 'vsls/vscode', |
| 30 | +]; |
| 31 | +exports.nodeModulesToReplacePaths = [ |
| 32 | + ...exports.nodeModulesToExternalize |
| 33 | +]; |
| 34 | +function getDefaultPlugins(name) { |
| 35 | + const plugins = []; |
| 36 | + if (!constants_1.isCI) { |
| 37 | + plugins.push(new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({ |
| 38 | + analyzerMode: 'static', |
| 39 | + reportFilename: `${name}.analyzer.html` |
| 40 | + })); |
| 41 | + } |
| 42 | + return plugins; |
| 43 | +} |
| 44 | +exports.getDefaultPlugins = getDefaultPlugins; |
| 45 | +function getListOfExistingModulesInOutDir() { |
| 46 | + const outDir = path.join(constants_1.ExtensionRootDir, 'out', 'client'); |
| 47 | + const files = glob.sync('**/*.js', { sync: true, cwd: outDir }); |
| 48 | + return files.map(filePath => `./${filePath.slice(0, -3)}`); |
| 49 | +} |
| 50 | +exports.getListOfExistingModulesInOutDir = getListOfExistingModulesInOutDir; |
0 commit comments