Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fonts not found when loading off cdn due to url getting mangled #186

Open
dqnykamp opened this issue Jun 10, 2024 · 1 comment
Open

fonts not found when loading off cdn due to url getting mangled #186

dqnykamp opened this issue Jun 10, 2024 · 1 comment

Comments

@dqnykamp
Copy link
Member

dqnykamp commented Jun 10, 2024

I published @doenet/standalone as a separate npm package so that we can serve it off the jsdelivr cdn. I just packaged the old 0.6 version (the one currently on doenet.org) and published it so one can get it via:

<script type="module" src="https://cdn.jsdelivr.net/npm/@doenet/standalone@0.6.1/dist/doenet-standalone.js"></script>
<link href="https://cdn.jsdelivr.net/npm/@doenet/standalone@0.6.1/dist/style.css" rel="stylesheet" type="text/css" />

However, when I load a page, I get the error that it cannot load
https://cdn.jsdelivr.net/npm/@doenet/standalone@0.6.1/fonts/files/open-sans-v18-latin-regular.woff2
The location of the file is /dist/fonts/, but it lost the /dist directory, so it cannot find the font.

@siefkenj
Copy link
Contributor

Yes, the path that the fonts are retrieved from is rewritten by one of the compilation processes...This is not an ideal situation :-/ and one reason why it would be good to have a packaging script that creates a new package.json just for the distribution. If you create that new package.json, then you can have all the files in the root of the package directory and there shouldn't be a pesky dist/ hiding them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants