Comments (6)
It is clear now.
from branle.
c04c4d7#diff-1d7ff4f413e8862d32dfe18796e76517d15cdb33a09e11ce2dc65c07c11df1f6R48 appears to have introduced this issue.
Edit: commenting the line out doesn't help. It still adds absolute paths to the minified result.
from branle.
I deploy by dropping the ./dist/spa/
directory on a webserver and it works.
The problem is that you'll need to rewrite all URLs to serve the base index.html
, otherwise linking directly to a profile or event will get you a 404. You can do that kind of rewrite in nginx or Caddy very easily, or on Netlify or these other static website servers.
from branle.
Would it be easy to restore the arcbtc/nostr behavior so I can try to then fix what you describe in other ways? The JS should be trivially able to figure out its base path and use it dynamically from there. "do rewrite in Caddy or nginx" is just adding complexity that would be nice to strip away so more people drop it onto their servers/blogs/websites.
from branle.
I don't understand what you're saying. I don't understand the error you're facing. I don't understand what is the behavior you want me to restore. I don't know how arcbtc/nostr worked.
I'm telling you it works by just deploying the files to a static file server. The nginx rewrite part is a detail and not necessary.
If it is not working to just deploy the files, please tell me what is not working. I don't understand the logs you posted on the first message. If I had to guess I would say they are caused by a caching issue.
from branle.
I have a website, so obviously that website has an index.html in its root folder that gets used if you navigate to website.com/. I now want to deploy nostr to website.com/nostr/ but the generated index.html includes /js/532.9c3f5fab.js
and not a relative js/532.9c3f5fab.js
or a magically correct absolute /nostr/js/532.9c3f5fab.js
which obviously points to a file that does not exist. If that is not clear or not how it works on your end, I'll reproduce it.
Edit: You said it's clear but here is anyway what I did:
branle(master)$ podman run --rm --volume $PWD:/t -it node bash
root@de15c894139f:/# cd /t
root@de15c894139f:/t# yarn
root@de15c894139f:/t#
exit
branle(master)$ cp -r dist/spa/ ../website.com/assets/branle
Now, surfing to http://localhost:4000/assets/branle/
the dev console in my browser says:
22:17:33.254 Loading failed for the <script> with source “http://localhost:4000/js/app.8cc937ea.js”. [branle:1:1](http://localhost:4000/assets/branle/)
22:17:33.254 Loading failed for the <script> with source “http://localhost:4000/js/vendor.0677838b.js”. [branle:1:1](http://localhost:4000/assets/branle/)
With arcbtc/nostr it just worked.
from branle.
Related Issues (16)
- feature request: onboarding guide HOT 1
- Feature Request: CTRL + Enter shortcut to add post/reply HOT 3
- DM notification keeps popping up HOT 2
- Feature Request: Local data backup & restore HOT 2
- error: A hash of at least 15 characters is required HOT 8
- Suggestion: Profile name on the Home page HOT 2
- Suggestion: NIP-05 -> pubkey redirect HOT 1
- The name may not be well received in the French community HOT 1
- can't reply to myself more than once HOT 1
- Python not found HOT 3
- License? HOT 1
- A kind 3 event is adding a wrong relay for a contact
- Not working in private browsing HOT 1
- Profile save button should be disable in public key mode HOT 2
- feature request: multi-account management HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from branle.