Upgraded webpack config

This commit is contained in:
Elio Struyf
2020-12-10 15:34:46 +01:00
parent 72d9887027
commit 38aab4052d
4 changed files with 31 additions and 14 deletions
+14 -5
View File
@@ -34,6 +34,7 @@
"version": "7.12.5",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz",
"integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==",
"dev": true,
"requires": {
"regenerator-runtime": "^0.13.4"
}
@@ -1137,7 +1138,8 @@
"compute-scroll-into-view": {
"version": "1.0.16",
"resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-1.0.16.tgz",
"integrity": "sha512-a85LHKY81oQnikatZYA90pufpZ6sQx++BoCxOEMsjpZx+ZnaKGQnCyCehTRr/1p9GBIAHTjcU9k71kSYWloLiQ=="
"integrity": "sha512-a85LHKY81oQnikatZYA90pufpZ6sQx++BoCxOEMsjpZx+ZnaKGQnCyCehTRr/1p9GBIAHTjcU9k71kSYWloLiQ==",
"dev": true
},
"concat-map": {
"version": "0.0.1",
@@ -1497,6 +1499,7 @@
"version": "6.0.6",
"resolved": "https://registry.npmjs.org/downshift/-/downshift-6.0.6.tgz",
"integrity": "sha512-tmLab3cXCn6PtZYl9V8r/nB2m+7/nCNrwo0B3kTHo/2lRBHr+1en1VNOQt2wIt0ajanAnxquZ00WPCyxe6cNFQ==",
"dev": true,
"requires": {
"@babel/runtime": "^7.11.2",
"compute-scroll-into-view": "^1.0.14",
@@ -2751,7 +2754,8 @@
"js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
"dev": true
},
"js-yaml": {
"version": "3.13.1",
@@ -2922,6 +2926,7 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"dev": true,
"requires": {
"js-tokens": "^3.0.0 || ^4.0.0"
}
@@ -3236,7 +3241,8 @@
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
"dev": true
},
"object-copy": {
"version": "0.1.0",
@@ -3533,6 +3539,7 @@
"version": "15.7.2",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz",
"integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==",
"dev": true,
"requires": {
"loose-envify": "^1.4.0",
"object-assign": "^4.1.1",
@@ -3661,7 +3668,8 @@
"react-is": {
"version": "16.13.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
"dev": true
},
"react-transition-group": {
"version": "4.4.1",
@@ -3703,7 +3711,8 @@
"regenerator-runtime": {
"version": "0.13.7",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
"integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew=="
"integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==",
"dev": true
},
"regex-not": {
"version": "1.0.2",
+6 -6
View File
@@ -216,10 +216,11 @@
]
},
"scripts": {
"vscode:prepublish": "webpack --mode production",
"vscode:prepublish": "npm run clean && webpack --mode production",
"build:ext": "webpack --mode development",
"dev:ext": "webpack --mode development --watch",
"test-compile": "tsc -p ./"
"test-compile": "tsc -p ./",
"clean": "rm -rf dist"
},
"devDependencies": {
"@iarna/toml": "2.2.3",
@@ -244,9 +245,8 @@
"tslint": "6.1.3",
"typescript": "4.0.2",
"webpack": "4.44.2",
"webpack-cli": "3.3.12"
},
"dependencies": {
"webpack-cli": "3.3.12",
"downshift": "6.0.6"
}
},
"dependencies": {}
}
+1 -1
View File
@@ -240,7 +240,7 @@ export class ExplorerView implements WebviewViewProvider, Disposable {
const styleVSCodeUri = webView.asWebviewUri(Uri.joinPath(this.extPath, 'assets/media', 'vscode.css'));
const styleResetUri = webView.asWebviewUri(Uri.joinPath(this.extPath, 'assets/media', 'reset.css'));
const stylesUri = webView.asWebviewUri(Uri.joinPath(this.extPath, 'assets/media', 'styles.css'));
const scriptUri = webView.asWebviewUri(Uri.joinPath(this.extPath, 'dist', 'bundle.js'));
const scriptUri = webView.asWebviewUri(Uri.joinPath(this.extPath, 'dist', 'viewpanel.js'));
const nonce = this.getNonce();
return `
+10 -2
View File
@@ -20,7 +20,7 @@ module.exports = [
vscode: 'commonjs vscode'
},
resolve: {
extensions: ['.ts', '.js', '.tsx', '.jsx']
extensions: ['.ts', '.js']
},
module: {
rules: [{
@@ -30,6 +30,10 @@ module.exports = [
loader: 'ts-loader'
}]
}]
},
performance: {
maxEntrypointSize: 400000,
maxAssetSize: 400000
}
},
{
@@ -38,7 +42,7 @@ module.exports = [
entry: './src/viewpanel/index.tsx',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
filename: 'viewpanel.js'
},
devtool: 'source-map',
resolve: {
@@ -52,6 +56,10 @@ module.exports = [
loader: 'ts-loader'
}]
}]
},
performance: {
maxEntrypointSize: 400000,
maxAssetSize: 400000
}
}
];