Open thisVioletHydra opened 1 year ago
It seems that the import statements are missing for vue's internal stuff, like ref
...
Vite throws without log, but the inspector jumps to the debugger.
Here is a working template:
<template>
<codemirror
v-model="code"
placeholder="Code goes here..."
:style="{ height: '400px' }"
:autofocus="true"
:indent-with-tab="true"
:tab-size="2"
:extensions="extensions"
/>
</template>
<script>
import { defineComponent, ref } from 'vue'
import { Codemirror } from 'vue-codemirror'
import { javascript } from '@codemirror/lang-javascript'
import { oneDark } from '@codemirror/theme-one-dark'
export default defineComponent({
components: {
Codemirror
},
setup() {
const code = ref(`console.log('Hello, world!')`)
const extensions = [javascript(), oneDark]
return {
code,
extensions,
}
}
})
</script>
"unplugin-auto-import": "^0.12.1", "unplugin-vue-components": "^0.22.12",
i used this libs, do u know what is it? no need always
import vue
or other stuff,vite
will do it automatically I think the problem is something else 🤔
no need always
import vue
or other stuff,vite
will do it automatically
@thisVioletHydra both plugins only import from folders you previously defined, esp. auto-import
which handles regular ESM exports needs care and can skip over files and their exports you'd expect to be available.
I eventually droped it for being too unreliable and only use unplugin-vue-components
for .vue imports.
Describe the bug
Hi, I did everything according to the guide, as a result, nothing works. no code highlighting there is nothing Even the out of the box option doesn't work.
Reproduction
System Info
Used Package Manager
yarn
Validations