simple-code-editor
simple-code-editor copied to clipboard
Is this module compatible with nuxt 3?
Is this mod compatible with nuxt 3? If not, what mode could I use?
I tried to install this module and I get this error
Uncaught SyntaxError: The requested module '/_nuxt/node_modules/highlight.js/lib/index.js?v=f8fda8bf' does not provide an export named 'default' (at index.js?v=f8fda8bf:2:8)
Same error here
I can't confirm this is working for me in Nuxt 3 with vuetify. I got errors when following the readme to add the module to nuxt.config.ts. However, by just skipping that and simply using the following steps it's working:
- run
npm install simple-code-editor - goto your target file on client and
import hljs from "highlight.js";
import CodeEditor from "simple-code-editor";
- add the component import to your default export object
components: {
CodeEditor,
},
- Add markup and bind to store:
<v-row>
<v-col>
<client-only>
<CodeEditor width="100%" v-model="Store.templateText"></CodeEditor>
</client-only>
</v-col>
</v-row>