Skip to content

CORS issue, trying to expand "header" #16

Answered by jbaiter
andybuki asked this question in Q&A
Discussion options

You must be logged in to vote

Oh, you need to build the web app before you use the index.html!

    <script type="module" src="./src/main.ts"></script>

This is not going to work, your Browser doesn't know what to do with TypeScript modules.

Here's what you need to do:

  • Install pnpm: npm install -g pnpm
  • Install all dependencies: pnpm install
  • Build pdiiif-lib: cd pdiiif-lib && pnpm build && cd ..
  • Build pdiiif-web: cd pdiiif-web && pnpm build
  • The index.html + JavaScript + CSS that you can then use in your own app will be in the dist subdirectory of pdiiif-web

But please be aware that the example application in pdiiif-web is not really intended to be embedded into other sites, since its styles assume that it has the whol…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@andybuki
Comment options

Answer selected by andybuki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants