diff --git a/facets.module b/facets.module
index 70c65f7..d05cd27 100644
--- a/facets.module
+++ b/facets.module
@@ -122,3 +122,13 @@ function facets_preprocess_block(&$variables) {
     $variables['attributes']['class'][] = 'block-facet-widget--' . Html::cleanCssIdentifier($facet->getWidget()['type']);
   }
 }
+
+/**
+ * Implements hook_views_plugins_style_alter().
+ */
+function facets_views_plugins_style_alter(array &$plugins) {
+  if (!\Drupal::moduleHandler()->moduleExists('rest')) {
+    // Core's rest module is optional but the plugin depends on it.
+    unset($plugins['facets_serializer']);
+  }
+}
