From 32f2d403e6da5dbc49966f94d5087fb1674ed954 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Wed, 7 Sep 2022 15:03:14 -0400 Subject: [PATCH] Fix typos in Webpack config and Makefile --- Makefile | 1 + mattermost-plugin/Makefile | 2 +- mattermost-plugin/webapp/webpack.config.js | 12 +++++++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 719e94216..83921dcec 100644 --- a/Makefile +++ b/Makefile @@ -186,6 +186,7 @@ watch-plugin: modd-precheck ## Run and upload the plugin to a development server live-watch-plugin: modd-precheck ## Run and update locally the plugin in the development server cd mattermost-plugin; make live-watch +.PHONY: watch-product watch-product: ## Run the product as something the Mattermost web app will watch for cd mattermost-plugin; make watch-product diff --git a/mattermost-plugin/Makefile b/mattermost-plugin/Makefile index 02cea8025..636c6c1c8 100644 --- a/mattermost-plugin/Makefile +++ b/mattermost-plugin/Makefile @@ -175,7 +175,7 @@ endif deploy-from-watch: bundle ./build/bin/pluginctl deploy $(PLUGIN_ID) dist/$(BUNDLE_NAME) -.PHONE: watch-product +.PHONY: watch-product watch-product: apply cd webapp && npm run start:product diff --git a/mattermost-plugin/webapp/webpack.config.js b/mattermost-plugin/webapp/webpack.config.js index a316dd818..e727d72f3 100644 --- a/mattermost-plugin/webapp/webpack.config.js +++ b/mattermost-plugin/webapp/webpack.config.js @@ -128,6 +128,7 @@ const config = { }; if (TARGET_IS_PRODUCT) { + // Set up module federation function makeSingletonSharedModules(packageNames) { const sharedObject = {}; @@ -173,7 +174,16 @@ if (TARGET_IS_PRODUCT) { } else { config.resolve.alias['react-intl'] = path.resolve(__dirname, '../../webapp/node_modules/react-intl/'); - config.outputs = { + config.externals = { + react: 'React', + redux: 'Redux', + 'react-redux': 'ReactRedux', + 'mm-react-router-dom': 'ReactRouterDom', + 'prop-types': 'PropTypes', + 'react-bootstrap': 'ReactBootstrap', + }; + + config.output = { devtoolNamespace: PLUGIN_ID, path: path.join(__dirname, '/dist'), publicPath: '/',