@ -352,9 +352,8 @@
"scripts": {
"vscode:prepublish": "yarn run build && cd webview && yarn run build",
"build": "webpack --mode production",
"compile": "webpack --mode none --info-verbosity verbose --display-modules",
"profile": "webpack --mode production --profile --json > stats.json",
"watch": "webpack --mode none --watch --info-verbosity verbose --display-modules"
"compile": "webpack --mode development",
"watch": "webpack --mode development --watch"
},
"devDependencies": {
"@types/node": "^12.7.12",
@ -363,13 +362,13 @@
"@types/vscode": "~1.49.0",
"@types/webpack": "^4.4.25",
"@types/winreg": "^1.2.30",
"clean-webpack-plugin": "^2.0.0",
"clean-webpack-plugin": "^4.0.0-alpha.0",
"source-map": "^0.7.3",
"source-map-support": "^0.5.19",
"ts-loader": "^7.0.5",
"ts-loader": "^9.2.3",
"typescript": "^4.3.4",
"webpack": "^4.29.6",
"webpack-cli": "^3.2.3"
"webpack": "^5.40.0",
"webpack-cli": "^4.7.2"
"dependencies": {
"event-stream": "^4.0.1",
@ -5,7 +5,7 @@
const { join, resolve, dirname } = require('path');
const fs = require('fs');
const webpack = require('webpack');
const CleanWebpackPlugin = require('clean-webpack-plugin').default;
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
/**
* @template T
@ -46,6 +46,7 @@ class CopyPuttyExecutable {
/**@type {webpack.Configuration}*/
const config = {
mode: 'development',
target: 'node',
node: false,
entry: './src/extension.ts',
@ -80,6 +81,28 @@ const config = {
new CleanWebpackPlugin(),
new CopyPuttyExecutable(),
],
optimization: {
splitChunks: {
minSize: 0,
cacheGroups: {
default: false,
defaultVendors: false,
stats: {
ids: true,
assets: false,
chunks: false,
entrypoints: true,
modules: true,
groupModulesByPath: true,
modulesSpace: 50,
excludeModules(name, { issuerPath }) {
if (name.startsWith('external ')) return true;
return issuerPath && issuerPath[issuerPath.length - 1].name.startsWith('./node_modules');
}
module.exports = config;