bundle node_modules and (shallow) exclude them from the extension #56081

This commit is contained in:
Johannes Rieken 2018-08-22 11:35:27 +02:00
parent 34f629f7d9
commit ffe5da332d
5 changed files with 13 additions and 14 deletions

View file

@ -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/**

View file

@ -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',
},
});

View file

@ -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/**

View file

@ -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',
},
]
});

View file

@ -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`.