From 163c6108c6249c203803c989ecce37122c9a6113 Mon Sep 17 00:00:00 2001 From: Lucas Koehler Date: Mon, 24 Oct 2022 10:48:47 +0200 Subject: [PATCH] Remove obsolete node polyfill from tree editor extension Signed-off-by: Lucas Koehler --- src/app/index.ts | 1 - src/browser/index.ts | 7 ------- templates/app-browser-webpack-config.js | 21 --------------------- 3 files changed, 29 deletions(-) delete mode 100644 templates/app-browser-webpack-config.js diff --git a/src/app/index.ts b/src/app/index.ts index 3ebbbf8..d8cf39e 100644 --- a/src/app/index.ts +++ b/src/app/index.ts @@ -244,7 +244,6 @@ module.exports = class TheiaExtension extends Base { this.params.browserDevDependencies = ''; if (this.params.extensionType === ExtensionType.TreeEditor) { this.params.dependencies = `,\n "@theia/editor": "${this.params.theiaVersion}",\n "@theia/filesystem": "${this.params.theiaVersion}",\n "@theia/workspace": "${this.params.theiaVersion}",\n "@eclipse-emfcloud/theia-tree-editor": "next",\n "uuid": "^3.3.2"`; - this.params.browserDevDependencies = `,\n "node-polyfill-webpack-plugin": "latest"`; } if (this.params.extensionType === ExtensionType.Widget) { this.params.devdependencies = `,\n "@testing-library/react": "^11.2.7",\n "@types/jest": "^26.0.20",\n "jest": "^26.6.3",\n "ts-node": "^10.9.1",\n "ts-jest": "^26.5.6"`; diff --git a/src/browser/index.ts b/src/browser/index.ts index 0c0de9d..7736cc3 100644 --- a/src/browser/index.ts +++ b/src/browser/index.ts @@ -32,12 +32,5 @@ module.exports = class TheiaBrowser extends Base { params } ); - if (params.extensionType === 'tree-editor') { - this.fs.copyTpl( - this.templatePath('app-browser-webpack-config.js'), - this.destinationPath('browser-app/webpack.config.js'), - {} - ); - } } } diff --git a/templates/app-browser-webpack-config.js b/templates/app-browser-webpack-config.js deleted file mode 100644 index 72861ce..0000000 --- a/templates/app-browser-webpack-config.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file can be edited to customize webpack configuration. - * To reset delete this file and rerun theia build again. - */ -// @ts-check -const config = require('./gen-webpack.config.js'); - -/** - * Expose bundled modules on window.theia.moduleName namespace, e.g. - * window['theia']['@theia/core/lib/common/uri']. - * Such syntax can be used by external code, for instance, for testing. -config.module.rules.push({ - test: /\.js$/, - loader: require.resolve('@theia/application-manager/lib/expose-loader') -}); */ - -// Load node polyfills as they are no longer automatically included with webpack 5. -const NodePolyfillPlugin = require("node-polyfill-webpack-plugin") -config.plugins.push(new NodePolyfillPlugin()); - -module.exports = config;