diff --git a/CHANGELOG.md b/CHANGELOG.md index d287aabd..5eb15c48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Not released - Add improved htmlForFeature in skeleton [#215](https://github.com/CartoDB/carto-react-template/pull/215) +- Fix immutable/serializable checks for redux middleware in skeleton [#216](https://github.com/CartoDB/carto-react-template/pull/216) ## 1.0.0-rc.1 (2021-03-11) - Add cypress e2e tests in CI [#194](https://github.com/CartoDB/carto-react-template/pull/194) diff --git a/template-skeleton/template/src/store/store.js b/template-skeleton/template/src/store/store.js index af30cb9c..f9391e97 100644 --- a/template-skeleton/template/src/store/store.js +++ b/template-skeleton/template/src/store/store.js @@ -72,6 +72,15 @@ const staticReducers = { }; function getCustomMiddleware() { + const devConfig = { + immutableCheck: { + ignoredPaths: ['carto.viewportFeatures'], + }, + serializableCheck: { + ignoredPaths: ['carto.viewportFeatures'], + ignoredActions: ['carto/setViewportFeatures'], + }, + }; const prodConfig = { immutableCheck: false, @@ -80,7 +89,7 @@ function getCustomMiddleware() { const isProductionEnv = process.env.NODE_ENV === 'production'; - return isProductionEnv ? getDefaultMiddleware(prodConfig) : getDefaultMiddleware(); + return getDefaultMiddleware(isProductionEnv ? prodConfig : devConfig); } // Configure the store