metonym / svelte-highlight

Syntax Highlighting for Svelte using highlight.js
https://svhe.onrender.com
MIT License
252 stars 13 forks source link

Add missing Svelte exports condition #307

Closed blueneogeo closed 8 months ago

blueneogeo commented 8 months ago

From https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition:

missing exports condition

| If you see a warning logged for this when using a Svelte library, please tell the library maintainers.

Using the svelte field in package.json to point at .svelte source files is deprecated and you must use a svelte export condition. vite-plugin-svelte 3 still resolves it as a fallback, but in a future major release this is going to be removed and without exports condition resolving the library is going to fail.

Example:

// package.json
  "files": ["dist"],
  "svelte": "dist/index.js",
+ "exports": {
+   ".": {
+     "svelte": "./dist/index.js"
+   }
  }
metonym commented 8 months ago

I'll take a look.

metonym commented 8 months ago

Fixed in v7.4.3

metonym commented 8 months ago

Note: I encountered some rough edges when attempting to use it with TypeScript and Rollup.

If you're reading this, make sure to use v7.4.6.

Fixes include:

blueneogeo commented 8 months ago

Thank you for the quick fix