Skip to content

Commit

Permalink
try vite worker support
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianvasquez committed Dec 26, 2024
1 parent f751ebd commit 3408d29
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ <h1>Display a Supernote File</h1>
<script type="module">
import { SupernoteX } from 'supernote-typescript'

import MyWorker from './src/worker?worker'

class SupernoteWorker {
constructor () {
this.worker = new Worker(
new URL('./src/worker.js?v=' + Date.now(), import.meta.url),
{ type: 'module' },
)
this.worker = new MyWorker()
}

process (note, pageIndex) {
Expand Down

0 comments on commit 3408d29

Please sign in to comment.