This example uses OpenLayers v10.9.0. The latest is v.
Edit

#### Tiled WMS Wrapping

wms 13 tile 10 dateline 2 wrap 2 180 2

#####

Example of a tiled WMS layer that wraps across the 180° meridian.

By default, WMS tiles are reused across the 180° meridian. This behavior can be disabled by setting the `wrapX` option to `false`.

##### main.js

    import Map from 'ol/Map.js';
    import View from 'ol/View.js';
    import TileLayer from 'ol/layer/Tile.js';
    import OSM from 'ol/source/OSM.js';
    import TileWMS from 'ol/source/TileWMS.js';

    const layers = [
      new TileLayer({
        source: new OSM(),
      }),
      new TileLayer({
        source: new TileWMS({
          url: 'https://ahocevar.com/geoserver/ne/wms',
          params: {'LAYERS': 'ne:ne_10m_admin_0_countries', 'TILED': true},
          serverType: 'geoserver',
        }),
      }),
    ];
    const map = new Map({
      layers: layers,
      target: 'map',
      view: new View({
        center: [0, 0],
        zoom: 1,
      }),
    });

##### index.html

    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="UTF-8">
        <title>Tiled WMS Wrapping</title>
        <link rel="stylesheet" href="node_modules/ol/ol.css">
        <style>
          .map {
            width: 100%;
            height: 400px;
          }
        </style>
      </head>
      <body>
        <div id="map" class="map"></div>

        <script type="module" src="main.js"></script>
      </body>
    </html>

##### package.json

    {
      "name": "wms-tiled-wrap-180",
      "dependencies": {
        "ol": "10.9.0"
      },
      "devDependencies": {
        "vite": "^3.2.3"
      },
      "scripts": {
        "start": "vite",
        "build": "vite build"
      }
    }