Comments (5)
Thanks for the report! I see this as well.
This is due to the same issue as here: sveltejs/language-tools#573 The library uses a bunch of different export enum
statements, and it looks like TypeScript transpilation ends up producing code that generates these warnings. The linked issue just silenced the warnings in the language tools, but that doesn't help other parts of the ecosystem like vite-plugin-svelte. It feels to me like the transpilation process needs to be fixed to not produce Svelte code that will generate a warning. I'm not sure which tool should ultimately be responsible for fixing this, so I'll poke around and see what we can do.
In the meantime, it's completely safe to ignore these; they're a false positive. Sorry for the spam!
from svelte-headlessui.
Just as an FYI to anyone following this thread--because I personally find this super annoying, especially in the REPL, so I imagine you folks do too--I submitted a PR to Svelte itself that would fix these warnings. So far the maintainer response has been positive so I'm optimistic it could land within the next few weeks. Thanks for your patience!
from svelte-headlessui.
Is it the same issue with these warnings?
[vite-plugin-svelte] ./node_modules/@rgossiaux/svelte-headlessui/components/dialog/Dialog.svelte:2:11 Dialog has unused export property 'DialogStates'. If it is for external reference only, please consider using export const DialogStates
[vite-plugin-svelte] ./node_modules/@rgossiaux/svelte-headlessui/components/disclosure/Disclosure.svelte:3:11 Disclosure has unused export property 'DisclosureStates'. If it is for external reference only, please consider using export const DisclosureStates
[vite-plugin-svelte] ./node_modules/@rgossiaux/svelte-headlessui/components/listbox/Listbox.svelte:1:37 Listbox has unused export property 'ListboxStates'. If it is for external reference only, please consider using export const ListboxStates
[vite-plugin-svelte] ./node_modules/@rgossiaux/svelte-headlessui/components/menu/Menu.svelte:9:11 Menu has unused export property 'MenuStates'. If it is for external reference only, please consider using export const MenuStates
[vite-plugin-svelte] ./node_modules/@rgossiaux/svelte-headlessui/components/popover/Popover.svelte:1:37 Popover has unused export property 'PopoverStates'. If it is for external reference only, please consider using export const PopoverStates
[vite-plugin-svelte] ./node_modules/@rgossiaux/svelte-headlessui/internal/StackContextProvider.svelte:1:37 StackContextProvider has unused export property 'StackMessage'. If it is for external reference only, please consider using export const StackMessage
[vite-plugin-svelte] ./node_modules/@rgossiaux/svelte-headlessui/utils/Render.svelte:21:11 Render has unused export property 'RenderStrategy'. If it is for external reference only, please consider using export const RenderStrategy
[vite-plugin-svelte] ./node_modules/@rgossiaux/svelte-headlessui/utils/Render.svelte:3:11 Render has unused export property 'Features'. If it is for external reference only, please consider using export const Features
[vite-plugin-svelte] ./node_modules/@rgossiaux/svelte-headlessui/components/transitions/common.svelte:4:11 Common has unused export property 'TreeStates'. If it is for external reference only, please consider using export const TreeStates
from svelte-headlessui.
After a long wait, Svelte 3.46.5 was just released today, which contains a fix for this issue that I submitted myself.
You can upgrade Svelte to 3.46.5 and these warnings should finally go away!
from svelte-headlessui.
I saw two members already looked at the PR. Hopefully a maintainer will have a chance to get to it soon. Thanks for tackling that issue, @rgossiaux, as it creeps up in playwrite runs too and I'm about to >/dev/null
😆
from svelte-headlessui.
Related Issues (20)
- component disappears after refresh when used in a svelte component HOT 1
- Support for @headlessui/tailwindcss HOT 1
- List box doesn't position absolute HOT 1
- Support Svelte 4 HOT 14
- Can't bind popover's "open" prop to a boolean HOT 1
- Switch not toggling
- RadioGroup and Listbox do not work properly when used together
- Can you readd on:change for listbox, etc
- Typo in Tabs Component Page
- Typescript Error 2322 when assigning object to ListboxOption value parameter
- Dialog breakes SvelteKit client-side routing HOT 2
- Conflicts in Svelte resolve
- Tree shaking HOT 1
- Time to update svelte? HOT 1
- Dialog nested in a Menu automatically opens when Menu opens
- warning when using sveltekit v2: The following packages have a svelte field in their package.json but no exports condition for svelte. HOT 1
- Missing close event on Menu
- Headless UI v2.0.0-alpha released
- Popover not detecting content click events (links / otherwise) in web component context (with fix) HOT 2
- Tabs: adding/removing tab work not properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svelte-headlessui.