-
Notifications
You must be signed in to change notification settings - Fork 134
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
cdn dependency #1
Comments
Hi, That is not a bad idea at all, My only requirement for this project is that everyone should be able to use the files from the git repository immediately, without having to build anything. Maybe I could bundle all the dependencies into a single file, and add it to the source files, maybe using webpack? I'll try to do something |
Fair enough.
Sounds good. 👍 |
@bokub Any news? I just started hosting an instance on PussTheCat.org ( https://nopaste.pussthecat.org/ ) and it's one of my only complaint with it. If you don't do it, I'll surely fork the project and do it. |
Well, I couldn't manage to do that in an elegant way.. 🤷🏻♂️ Feel free to submit a PR, I'm curious to see what can be done, but I think the easiest way to get rid of the CDN is just to download the files and host them yourself. |
@bokub If I do it, I'll just do it "the easy way": download the files served by the CDNs, and serve them internally (similar to how I fixed the namazso.eu website: namazso/namazso.eu#2 |
Yeah that's the easiest thing to do. For NoPaste, it's just one css file and one js file. |
@bokub Okay so I started doing it, and I am currently stuck: Also, it's currently broken for whatever reason: https://github.com/TheFrenchGhosty/nopaste |
In the current code, if I replace If you want to serve the modes yourself, you need to download and host every |
@bokub Oh I completely missed that! So this fixed it, but it's now complaining about not being able to load the compression library: I tried various path but I couldn't make it to work, any idea? |
You need to provide the whole URL, not just Otherwise, I think you can replace the first lines of - const blob = new Blob(['importScripts("https://cdn.jsdelivr.net/npm/lzma@2.3.2/src/lzma_worker.min.js");']);
- const lzma = new LZMA(window.URL.createObjectURL(blob));
+ const lzma = new LZMA("./scripts/lzma_worker.js"); |
@bokub And it's working! Thanks a lot! |
It's because you're opening the files directly with your browser ( |
@bokub Ah, that's good to know! Thanks for the help :) |
I just came across NoPaste. The concept of not "storing" the data at all seems very appealing to me.
Relaying on external CDNs to ship most of the required files seems counter-intuitive to me.
Have you ever considered creating a deployable package which includes the dependencys so that they are shipped from the local host?
The text was updated successfully, but these errors were encountered: