Files
frontend-app-communications/webpack.prod.config.js
Justin Hynes 2387d621d7 fix: Update webpack config to be less strict
[MICROBA-1743]

Fixes an issue where we couldn't override the header and footer with the branded versiom within the Comms MFE because some of the dependencies of the branded components are not currently Webpack5 compliant. Adds a rule to make webpack5 less strict with imports that do not include a file extension.

This also includes a change so that the Comms MFE uses the Open edX branded colors/styles by default.
2022-03-08 14:22:22 -05:00

22 lines
508 B
JavaScript

const { createConfig } = require('@edx/frontend-build');
const config = createConfig('webpack-prod');
config.module.rules[0].exclude = /node_modules\/(?!(tinymce|@tinymce|@edx))/;
/**
* See comment in webpack.dev.config.js for details on this rule and why it is needed.
*/
const webpack5esmInteropRule = {
test: /\.m?js/,
resolve: {
fullySpecified: false,
},
};
const otherRules = config.module.rules;
config.module.rules = [webpack5esmInteropRule, ...otherRules];
module.exports = config;