transformJsSource(source) {
    return (
      source
        // remove "../src/" prefix to have the same import syntax as the documentation
        .replaceAll(
          /(["'])(\.\.\/src\/ol\/[^"']+\.js)\1/g,
          (full, quote, path) => "'" + path.slice(7) + "'",
        )
        // Remove worker loader import and modify `new Worker()` to add source
        .replaceAll(/import Worker from 'worker-loader![^\n]*\n/g, '')
        .replace('new Worker()', "new Worker('./worker.js', {type: 'module'})")
    );
  }
@param {string} source Source code
@return {string} Transformed source