--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -445,24 +445,9 @@ common common-executable
   build-depends:    pandoc
   ghc-options:      -rtsopts -with-rtsopts=-A8m -threaded
 
-library xml-light
-  import:        common-options
-  build-depends: xml                   >= 1.3.12   && < 1.4,
-                 xml-conduit           >= 1.9.1.1  && < 1.10,
-                 xml-types             >= 0.3      && < 0.4,
-                 containers            >= 0.6.0.1  && < 0.7,
-                 text                  >= 1.1.1.0  && < 2.1
-
-  hs-source-dirs:  xml-light
-  exposed-modules: Text.Pandoc.XML.Light,
-                   Text.Pandoc.XML.Light.Types,
-                   Text.Pandoc.XML.Light.Proc,
-                   Text.Pandoc.XML.Light.Output
-
 library
   import:        common-options
-  build-depends: xml-light,
-                 Glob                  >= 0.7      && < 0.11,
+  build-depends: Glob                  >= 0.7      && < 0.11,
                  JuicyPixels           >= 3.1.6.1  && < 3.4,
                  SHA                   >= 1.6      && < 1.7,
                  aeson                 >= 2.0.1.0  && < 2.2,
@@ -525,6 +510,8 @@ library
                  zip-archive           >= 0.4.3    && < 0.5,
                  zlib                  >= 0.5      && < 0.7,
                  xml                   >= 1.3.12   && < 1.4,
+                 xml-conduit           >= 1.9.1.1  && < 1.10,
+                 xml-types             >= 0.3      && < 0.4,
                  typst                 >= 0.1      && < 0.2,
                  vector                >= 0.12     && < 0.14
 
@@ -534,6 +521,7 @@ library
      cpp-options:   -DEMBED_DATA_FILES
      other-modules: Text.Pandoc.Data.BakedIn
   hs-source-dirs:  src
+                   xml-light
 
   exposed-modules: Text.Pandoc,
                    Text.Pandoc.App,
@@ -631,6 +619,10 @@ library
                    Text.Pandoc.Slides,
                    Text.Pandoc.Templates,
                    Text.Pandoc.XML,
+                   Text.Pandoc.XML.Light,
+                   Text.Pandoc.XML.Light.Types,
+                   Text.Pandoc.XML.Light.Proc,
+                   Text.Pandoc.XML.Light.Output
                    Text.Pandoc.SelfContained,
                    Text.Pandoc.Highlighting,
                    Text.Pandoc.Logging,
