by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 12 2018 10:41
    fossabot opened #419
  • Jan 12 2018 08:46
    pirelenito edited #418
  • Jan 12 2018 08:45
    pirelenito opened #418
  • Jan 02 2018 16:27
    pirelenito closed #375
  • Jan 02 2018 16:24
    pirelenito unlabeled #389
  • Jan 02 2018 16:24
    pirelenito labeled #389
  • Jan 02 2018 16:24
    pirelenito unlabeled #389
  • Jan 02 2018 16:23
    pirelenito synchronize #389
  • Jan 02 2018 16:18
    pirelenito closed #377
  • Jan 02 2018 16:18
    pirelenito synchronize #377
  • Jan 02 2018 16:05
    pirelenito closed #417
  • Jan 02 2018 16:05
    pirelenito closed #415
  • Jan 02 2018 15:42
    pirelenito synchronize #417
  • Jan 02 2018 15:35
    pirelenito synchronize #417
  • Jan 02 2018 10:14
    Deschtex synchronize #417
  • Jan 02 2018 09:59
    Deschtex synchronize #417
  • Dec 26 2017 18:11
    Deschtex synchronize #417
  • Dec 26 2017 17:53
    Deschtex synchronize #417
  • Dec 26 2017 17:51
    Deschtex synchronize #417
  • Dec 26 2017 15:12
    Deschtex synchronize #417
Xavier Via
@xaviervia
*js file names are hashed
(sorry I'm typing from the phone, I don't have a PC with me)
Karthik Iyengar
@karthikiyengar
Thank you for your interest :-)
Well, not quite - it does determine the hash correctly.
Let me try to give you an example
Assuming I am at localhost:4000, a call is made to :http://localhost:4000/index-9534b1f707e08f7d04c5.js and all is good
But as soon as the router kicks in and I navigated to a nested route, a call is made to http://localhost:4000/site-admin/index-9534b1f707e08f7d04c5.js
Ofcourse, the js file is not found, and nothing loads on the screen.
I have no control over this, because the script tag which loads the webpack bundle is injected into the index.html file. Else I would have changed it to an absolute path.
Xavier Via
@xaviervia
:D I think I should try it out to understand. I'm not sure if it could be a router weirdness or a sagui config. In principle it is unlikely that it is a sagui config because it's fairly standard webpack config, but of course it's super possible
If you want to try you can make it an absolute path. I haven't tried this myself, but you can set your js file to be built as a lib in sagui.config.js
Karthik Iyengar
@karthikiyengar
I am skeptical about it being something related to Sagui myself, because this is pretty standard stuff that everyone might be using.
Someone must have encountered it before me.
Xavier Via
@xaviervia
And then you can set it to build to umd so you can load it with a script tag
That could help debugging :)
Karthik Iyengar
@karthikiyengar
Well, if this is related to Sagui, I do you think that the absolute path from which assets are served should be configurable? Because mounting the app on non root (/) locations is pretty common.
Thanks Xavier, I'll take a look :D
Xavier Via
@xaviervia
Makes a lot of sense
Karthik Iyengar
@karthikiyengar
If your static assets are not coming from root, you're pretty much stuck (if you don't want to jump through hoops)
Thank you for your help, much appreciated. I will let you know how this ends lol.
Xavier Via
@xaviervia
saguijs/sagui#269
Sure thing, hope it works out :)
Karthik Iyengar
@karthikiyengar
Btw, create-react-app is doing this by using a property called "homepage" in package.json.
Might work for Sagui, if you feel that it's right.
Xavier Via
@xaviervia
For sure. We tried to keep the config minimalistic. I'll try to check if there is an underlying issue, maybe there is a general solution as well so that the config is not needed (it should probably be added anyway)
Karthik Iyengar
@karthikiyengar
That's exactly what I liked about Sagui, moved away from create-react-app today. Had to run eject to get anything done.
Then we were back to square one.
Xavier Via
@xaviervia
:D
Paulo actually talked about that with a lot of people about those issues before coming up with the current approach. Command line solutions didn't cut it for our use cases. I'm glad it's helpful.
Karthik Iyengar
@karthikiyengar
Pretty Interesting.
Okay - I was browsing through some of webpack dev server's docs, and I may be wrong here, but the webpack bundle certainly needs to be served from an absolute path.
I looked the the sagui configs, and I don't see an explicit publicPath set in the config, which means the bundle will always be generated at /
This would ideally break router.
Again - I find it hard to believe that I am the first person to face this with router and Sagui. It is highly possible that this might be something I might have missed.
*needs to be fetched from an absolute path - in index.html
Xavier Via
@xaviervia
It might just not have been reported before.
Karthik Iyengar
@karthikiyengar
Do you want me to open an issue with the details?
Xavier Via
@xaviervia
Could you share a gist with your setup on gh or something like that so I can play around with it later?
Karthik Iyengar
@karthikiyengar
I can also take it up if it is confirmed.
Sure.
Xavier Via
@xaviervia
Yes, even better. Thanks :)
Karthik Iyengar
@karthikiyengar
saguijs/sagui#270
Have provided a quick example.
Xavier Via
@xaviervia
Awesome
It's close to bed time around here so I'll take a look tomorrow, thanks for taking the time to report it :)
Karthik Iyengar
@karthikiyengar
Thank you for the interest and response.
Where are you at?
Xavier Via
@xaviervia
Stockholm, Sweden :)
Karthik Iyengar
@karthikiyengar
Ah, awesome!