Skip to content

Commit

Permalink
Fix viewer build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
myieye committed Oct 25, 2024
1 parent ebe59ed commit 2b38c07
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
import type { CustomFieldConfig } from '../../config-types';
import FieldEditor from '../field-editors/FieldEditor.svelte';
type T = $$Generic<unknown>;
// eslint-disable-next-line svelte/valid-compile
export let entity: T;
export let readonly: boolean;
export let customFieldConfigs: CustomFieldConfig[];
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@
id="note"
wsType="analysis"/>
<EntityEditor
entity={entry}
{readonly}
customFieldConfigs={[]}
on:change={() => dispatch('change', {entry})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
id="reference"
wsType="first-analysis"/>
<EntityEditor
entity={example}
{readonly}
customFieldConfigs={[]}
on:change
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
id="semanticDomains"
wsType="first-analysis" />
<EntityEditor
entity={sense}
{readonly}
customFieldConfigs={[]}
on:change
Expand Down
9 changes: 6 additions & 3 deletions frontend/viewer/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { fileURLToPath } from 'url';
import {fileURLToPath} from 'url';
import path from 'path';
import { sveltePreprocess } from 'svelte-preprocess';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
import {sveltePreprocess} from 'svelte-preprocess';
import {vitePreprocess} from '@sveltejs/vite-plugin-svelte';

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const postcssConfig = path.join(__dirname, 'postcss.config.cjs');

export default {
compilerOptions: {
customElement: true,
},
// Consult https://svelte.dev/docs#compile-time-svelte-preprocess
// for more information about preprocessors
preprocess: [vitePreprocess(), sveltePreprocess({
Expand Down
7 changes: 2 additions & 5 deletions frontend/viewer/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import {defineConfig} from 'vite';
import {svelte} from '@sveltejs/vite-plugin-svelte';

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
Expand Down Expand Up @@ -28,9 +28,6 @@ export default defineConfig(({ mode }) => {
},
},
plugins: [svelte({
compilerOptions: {
customElement: true,
},
onwarn: (warning, handler) => {
// we don't have control over these warnings and there are lots
if (warning.filename?.includes('node_modules/svelte-ux')) return;
Expand Down

0 comments on commit 2b38c07

Please sign in to comment.