Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/plugins/withReactStorefront.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ module.exports = ({ prefetchQueryParam, ...nextConfig } = {}) => {
}),
)

if (config.externals) {
// Making sure the AMP optimizer is bundled
config.externals = config.externals.filter(name => name !== '@ampproject/toolbox-optimizer')
// These are optional dependencies for the optimizer
// which are not used by default
config.externals.push('jimp')
config.externals.push('probe-image-size')
}

if (process.env.NODE_ENV === 'development') {
// This makes it easier to develop apps against a local clone of react-storefront linked with yalc. Here
// we ensure that the server build recompiles when any linked dependency changes.
Expand Down