implements prod webpack config override

This commit is contained in:
James
2020-06-12 16:47:21 -04:00
parent c10c91dd37
commit 4bdfe4d587

View File

@@ -4,7 +4,7 @@ const path = require('path');
const getStyleLoaders = require('./getStyleLoaders');
module.exports = (config) => {
const webpackConfig = {
let webpackConfig = {
entry: {
main: [path.resolve(__dirname, '../client/components/index.js')],
},
@@ -118,5 +118,9 @@ module.exports = (config) => {
webpackConfig.resolve.alias['payload-scss-overrides'] = path.resolve(__dirname, '../client/scss/overrides.scss');
}
if (config.webpack && typeof config.webpack === 'function') {
webpackConfig = config.webpack(webpackConfig);
}
return webpackConfig;
};