parent
06d2c2de91
commit
dccbf7cde8
@ -0,0 +1,17 @@ |
||||
import { useEffect, useState } from 'preact/hooks'; |
||||
|
||||
export const SpellChecker = () => { |
||||
const [regex, setRegex] = useState<string>(); |
||||
useEffect(() => { |
||||
if (!regex) { |
||||
setRegex(new URL(`./assets/img/abc.def`, import.meta.url).href); |
||||
} |
||||
}, [regex]); |
||||
return ( |
||||
<section> |
||||
<textarea rows={10} cols={100}> |
||||
{regex} |
||||
</textarea> |
||||
</section> |
||||
); |
||||
}; |
@ -1,8 +1,16 @@ |
||||
import { defineConfig } from 'vite'; |
||||
import preact from '@preact/preset-vite'; |
||||
import { viteThesaurusRegexPlugin } from './src/build-scripts/viteThesaurusRegexPlugin'; |
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({ |
||||
base: './', |
||||
plugins: [preact()], |
||||
assetsInclude: ['**/*.ooo-thesaurus'], |
||||
plugins: [ |
||||
viteThesaurusRegexPlugin({ |
||||
sourceUrl: new URL('src/', import.meta.url), |
||||
thesaurusPath: 'assets/th-en-x-basic.ooo-thesaurus', |
||||
}), |
||||
preact(), |
||||
], |
||||
}); |
||||
|
Loading…
Reference in new issue