|
1 | | -// Copyright (c) Microsoft Corporation. All rights reserved. |
2 | | -// Licensed under the MIT License. |
3 | | -'use strict'; |
4 | | - |
5 | | -const glob = require('glob'); |
6 | | -const path = require('path'); |
7 | | -const webpack_bundle_analyzer = require('webpack-bundle-analyzer'); |
8 | | -const constants = 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 | | - 'pdfkit', |
31 | | - 'crypto-js', |
32 | | - 'fontkit', |
33 | | - 'linebreak', |
34 | | - 'png-js', |
35 | | - '@koa/cors', |
36 | | - 'koa', |
37 | | - 'koa-compress', |
38 | | - 'koa-logger', |
39 | | - 'zeromq' |
40 | | -]; |
41 | | -exports.nodeModulesToReplacePaths = [...exports.nodeModulesToExternalize]; |
42 | | -function getDefaultPlugins(name) { |
43 | | - const plugins = []; |
44 | | - plugins.push( |
45 | | - new webpack_bundle_analyzer.BundleAnalyzerPlugin({ |
46 | | - analyzerMode: 'static', |
47 | | - reportFilename: `${name}.analyzer.html`, |
48 | | - generateStatsFile: true, |
49 | | - statsFilename: `${name}.stats.json`, |
50 | | - openAnalyzer: false // Open file manually if you want to see it :) |
51 | | - }) |
52 | | - ); |
53 | | - return plugins; |
54 | | -} |
55 | | -exports.getDefaultPlugins = getDefaultPlugins; |
56 | | -function getListOfExistingModulesInOutDir() { |
57 | | - const outDir = path.join(constants.ExtensionRootDir, 'out', 'client'); |
58 | | - const files = glob.sync('**/*.js', { sync: true, cwd: outDir }); |
59 | | - return files.map(filePath => `./${filePath.slice(0, -3)}`); |
60 | | -} |
61 | | -exports.getListOfExistingModulesInOutDir = getListOfExistingModulesInOutDir; |
| 1 | +// Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | +// Licensed under the MIT License. |
| 3 | +'use strict'; |
| 4 | + |
| 5 | +const glob = require('glob'); |
| 6 | +const path = require('path'); |
| 7 | +const webpack_bundle_analyzer = require('webpack-bundle-analyzer'); |
| 8 | +const constants = 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 | + 'pdfkit', |
| 31 | + 'crypto-js', |
| 32 | + 'fontkit', |
| 33 | + 'linebreak', |
| 34 | + 'png-js', |
| 35 | + '@koa/cors', |
| 36 | + 'koa', |
| 37 | + 'koa-compress', |
| 38 | + 'koa-logger', |
| 39 | + 'zeromq' |
| 40 | +]; |
| 41 | +exports.nodeModulesToReplacePaths = [...exports.nodeModulesToExternalize]; |
| 42 | +function getDefaultPlugins(name) { |
| 43 | + const plugins = []; |
| 44 | + plugins.push( |
| 45 | + new webpack_bundle_analyzer.BundleAnalyzerPlugin({ |
| 46 | + analyzerMode: 'static', |
| 47 | + reportFilename: `${name}.analyzer.html`, |
| 48 | + generateStatsFile: true, |
| 49 | + statsFilename: `${name}.stats.json`, |
| 50 | + openAnalyzer: false // Open file manually if you want to see it :) |
| 51 | + }) |
| 52 | + ); |
| 53 | + return plugins; |
| 54 | +} |
| 55 | +exports.getDefaultPlugins = getDefaultPlugins; |
| 56 | +function getListOfExistingModulesInOutDir() { |
| 57 | + const outDir = path.join(constants.ExtensionRootDir, 'out', 'client'); |
| 58 | + const files = glob.sync('**/*.js', { sync: true, cwd: outDir }); |
| 59 | + return files.map((filePath) => `./${filePath.slice(0, -3)}`); |
| 60 | +} |
| 61 | +exports.getListOfExistingModulesInOutDir = getListOfExistingModulesInOutDir; |
0 commit comments