diff --git a/packages/nx-shopify/src/webpack/configs/common.config.ts b/packages/nx-shopify/src/webpack/configs/common.config.ts index 443ff1e..33ca13f 100644 --- a/packages/nx-shopify/src/webpack/configs/common.config.ts +++ b/packages/nx-shopify/src/webpack/configs/common.config.ts @@ -65,16 +65,16 @@ function getExtraPlugins(options: BuildBuilderOptions) { } if (mediaQueriesConfig) { - console.log('Media quieries are: ', mediaQueriesConfig); - const mediaQueries = require(mediaQueriesConfig); - extraPlugins.push( - new MediaQueryPlugin({ - include: /.*/, - queries: mediaQueries, - }) - ); + if (typeof mediaQueries === 'object' && mediaQueries !== null) { + extraPlugins.push( + new MediaQueryPlugin({ + include: /.*/, + queries: mediaQueries, + }) + ); + } } return extraPlugins;