bundle node_modules and (shallow) exclude them from the extension #56081
This commit is contained in:
parent
34f629f7d9
commit
ffe5da332d
|
@ -2,3 +2,7 @@ test/**
|
|||
src/**
|
||||
out/**
|
||||
tsconfig.json
|
||||
node_modules/@emmetio/css-parser/**
|
||||
node_modules/@emmetio/html-matcher/**
|
||||
node_modules/@emmetio/math-expression/**
|
||||
node_modules/image-size/**
|
||||
|
|
|
@ -15,10 +15,6 @@ module.exports = withDefaults({
|
|||
extension: './src/extension.ts',
|
||||
},
|
||||
externals: {
|
||||
'@emmetio/css-parser': 'commonjs @emmetio/css-parser',
|
||||
'@emmetio/html-matcher': 'commonjs @emmetio/html-matcher',
|
||||
'@emmetio/math-expression': 'commonjs @emmetio/math-expression',
|
||||
'image-size': 'commonjs image-size',
|
||||
'vscode-emmet-helper': 'commonjs vscode-emmet-helper',
|
||||
},
|
||||
});
|
||||
|
|
|
@ -3,3 +3,8 @@ test/**
|
|||
out/**
|
||||
tsconfig.json
|
||||
build/**
|
||||
node_modules/byline/**
|
||||
node_modules/file-type/**
|
||||
node_modules/iconv-lite/**
|
||||
node_modules/jschardet/**
|
||||
node_modules/which/**
|
||||
|
|
|
@ -25,14 +25,5 @@ module.exports = withDefaults({
|
|||
{ from: './out/*.sh', to: '[name].sh' },
|
||||
{ from: './out/nls.*.json', to: '[name].json' }
|
||||
])
|
||||
],
|
||||
externals: {
|
||||
"byline": 'commonjs byline',
|
||||
"file-type": 'commonjs file-type',
|
||||
"iconv-lite": 'commonjs iconv-lite',
|
||||
"jschardet": 'commonjs jschardet',
|
||||
"vscode-extension-telemetry": 'commonjs vscode-extension-telemetry',
|
||||
"vscode-nls": 'commonjs vscode-nls',
|
||||
"which": 'commonjs which',
|
||||
},
|
||||
]
|
||||
});
|
||||
|
|
|
@ -46,6 +46,9 @@ module.exports = function withDefaults(/**@type WebpackConfig*/extConfig) {
|
|||
},
|
||||
externals: {
|
||||
'vscode': 'commonjs vscode', // ignored because it doesn't exist
|
||||
|
||||
"vscode-extension-telemetry": 'commonjs vscode-extension-telemetry', // commonly used
|
||||
"vscode-nls": 'commonjs vscode-nls',
|
||||
},
|
||||
output: {
|
||||
// all output goes into `dist`.
|
||||
|
|
Loading…
Reference in a new issue