simple-code-editor icon indicating copy to clipboard operation
simple-code-editor copied to clipboard

[email protected] does not provide an export named 'default'

Open houyanmin opened this issue 1 year ago • 3 comments

houyanmin avatar Sep 10 '24 02:09 houyanmin

The requested module '/node_modules/.pnpm/[email protected]/node_modules/highlight.js/lib/index.js?v=eb8eb25c' does not provide an export named 'default'

houyanmin avatar Sep 10 '24 02:09 houyanmin

import hljs from 'highlight.js';
//...

<CodeEditor :highlight="hljs"/>

tommed avatar Sep 24 '24 16:09 tommed

To solve this issue without importing highlight.js manually, add the following to your vite.config.ts:

optimizeDeps: {
    include: ['highlight.js']
}

joesavage-silabs avatar Oct 17 '25 21:10 joesavage-silabs