Subscribe on changes!

Could not import { RendererOptions } from '@vue/runtime-core'.

avatar
Jan 23rd 2022

Version

3.2.29

Reproduction link

jsfiddle.net/pkcqg0wr/6/

Steps to reproduce

import { createRenderer, RendererOptions } from '@vue/runtime-core' import App from '@/App.vue'

const createApp = function(rootComponent) { return createRenderer({ ...RendererOptions, createElement(type) {

  const el = RendererOptions.createElement(type)
  
  doSomeThingWith(el)
  
  return RendererOptions.createElement
},

}, args).createApp(rootComponent) }

const appInstance = createApp(App) appInstance.mount('#app')

What is expected?

RendererOptions is accessable

What is actually happening?

it is not export

avatar
Jan 23rd 2022

That API doesn't exist, there is no bug.

If you instead want to propose that we expose the default options for creating a renderer, have a look at what @vue/runtime-dom does and exposes, and if you are still missing something, consider opening a discussion in github.com/vuejs/rfcs

avatar
Jan 24th 2022

RendererOptions is a type, not an API.