src/workers/mupdf.worker.ts
: imports the worker script, exposes functionality from it.src/hooks/useMupdf.hook.ts
: enables and initializes the worker, exposes hooks to interact with it.src/App.tsx
: calls the hook, and uses some demo functionality.
Before running the development server or building the project, make sure to install the dependencies:
yarn
Run yarn dev
for a dev server. Navigate to http://localhost:5173/
. The application will automatically reload if you change any of the source files.
Run yarn build
to build the project. The build artifacts will be stored in the dist/
directory.
After building the project, you can preview the production build locally using: yarn preview
This command will serve the contents of the dist
directory, allowing you to check the production version of your application before deployment. By default, it will be available at http://localhost:4173/
.