Originally created by @ryankupk on GitHub (Mar 1, 2024).
Is your feature request related to a problem? Please describe.
When building the frontend (npm run build) there are a lot of excess warnings - some for unused css selectors and some for unused export properties. These are reported when running npm run dev as well but are not quite as big/intrusive, but will also show up every time that there's a change and the server reloads so it can get excessive
Describe the solution you'd like
These are pretty quick fixes
Delete unused export let lines from the files where they appear
Describe alternatives you've considered
I've considered just ignoring them and have been doing that, it would be nice to change this though
Additional context
Including a couple of brief examples:
transforming (98) node_modules/@sveltejs/kit/src/runtime/client/utils.js4:22:35 AM [vite-plugin-svelte] /home/ryankupk/open-webui/src/lib/components/chat/Messages.svelte:15:11 Messages has unused export property 'processing'. If it is for external reference only, please consider using `export const processing`
13: export let continueGeneration;
14: export let regenerateResponse;
15: export let processing = "";
^
16: export let bottomPadding = false;
17: export let autoScroll;
4:22:35 AM [vite-plugin-svelte] /home/ryankupk/open-webui/src/lib/components/documents/AddDocModal.svelte:14:11 AddDocModal has unused export property 'selectedDoc'. If it is for external reference only, please consider using `export const selectedDoc`
12: import { SUPPORTED_FILE_EXTENSIONS, SUPPORTED_FILE_TYPE } from "$lib/constants";
13: export let show = false;
14: export let selectedDoc;
^
15: let inputFiles;
16: let tags = [];
I also have already made these changes locally and tested, and can raise a PR, the contribution guidelines say to create an issue first so I'm doing so here in case there's any disagreement on anything above
Originally created by @ryankupk on GitHub (Mar 1, 2024).
**Is your feature request related to a problem? Please describe.**
When building the frontend (`npm run build`) there are a lot of excess warnings - some for unused css selectors and some for unused export properties. These are reported when running `npm run dev` as well but are not quite as big/intrusive, but will also show up every time that there's a change and the server reloads so it can get excessive
**Describe the solution you'd like**
These are pretty quick fixes
1. Update svelte.config.js according to [this SO post](https://stackoverflow.com/questions/60677782/how-to-disable-svelte-warning-unused-css-selector)
2. Delete unused `export let` lines from the files where they appear
**Describe alternatives you've considered**
I've considered just ignoring them and have been doing that, it would be nice to change this though
**Additional context**
Including a couple of brief examples:
```
transforming (98) node_modules/@sveltejs/kit/src/runtime/client/utils.js4:22:35 AM [vite-plugin-svelte] /home/ryankupk/open-webui/src/lib/components/chat/Messages.svelte:15:11 Messages has unused export property 'processing'. If it is for external reference only, please consider using `export const processing`
13: export let continueGeneration;
14: export let regenerateResponse;
15: export let processing = "";
^
16: export let bottomPadding = false;
17: export let autoScroll;
4:22:35 AM [vite-plugin-svelte] /home/ryankupk/open-webui/src/lib/components/documents/AddDocModal.svelte:14:11 AddDocModal has unused export property 'selectedDoc'. If it is for external reference only, please consider using `export const selectedDoc`
12: import { SUPPORTED_FILE_EXTENSIONS, SUPPORTED_FILE_TYPE } from "$lib/constants";
13: export let show = false;
14: export let selectedDoc;
^
15: let inputFiles;
16: let tags = [];
```
I also have already made these changes locally and tested, and can raise a PR, the contribution guidelines say to create an issue first so I'm doing so here in case there's any disagreement on anything above
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @ryankupk on GitHub (Mar 1, 2024).
Is your feature request related to a problem? Please describe.
When building the frontend (
npm run build) there are a lot of excess warnings - some for unused css selectors and some for unused export properties. These are reported when runningnpm run devas well but are not quite as big/intrusive, but will also show up every time that there's a change and the server reloads so it can get excessiveDescribe the solution you'd like
These are pretty quick fixes
export letlines from the files where they appearDescribe alternatives you've considered
I've considered just ignoring them and have been doing that, it would be nice to change this though
Additional context
Including a couple of brief examples:
I also have already made these changes locally and tested, and can raise a PR, the contribution guidelines say to create an issue first so I'm doing so here in case there's any disagreement on anything above
@tjbck commented on GitHub (Mar 2, 2024):
Updating
svelte.config.jsseems promising, feel free to make a PR!