setup(options = {}) {
    if (options.createGenerateId) {
      this.options.createGenerateId = options.createGenerateId
    }

    if (options.id) {
      this.options.id = {
        ...this.options.id,
        ...options.id
      }
    }

    if (options.createGenerateId || options.id) {
      this.generateId = this.options.createGenerateId(this.options.id)
    }

    if (options.insertionPoint != null) this.options.insertionPoint = options.insertionPoint
    if ('Renderer' in options) {
      this.options.Renderer = options.Renderer
    }

    // eslint-disable-next-line prefer-spread
    if (options.plugins) this.use.apply(this, options.plugins)

    return this
  }
Prepares various options, applies plugins.
Should not be used twice on the same instance, because there is no plugins
deduplication logic.