-
Notifications
You must be signed in to change notification settings - Fork 335
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
Add publicPath for static js #1672
Conversation
By the way, I'm not exactly sure what the context is with date-fn locale issues (is it a totally unrelated issue?), but this PR should fix loading date-fn files for locales other than en-US as well. Edit: I found this - #1574 - seems to be the exact same issue. In fact, #1657 is most likely a duplicate of #1574. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SleeplessOne1917 Are you still planning on replacing date-fns
with moment.js
? If so, how does that change the proposal here? Still needed?
I haven't gotten around to removing it yet, but if this PR works I'd much prefer it over bringing back the moment.js dependency. I'll test it tonight. |
@SleeplessOne1917 I don't think this'll resolve our ongoing timezone issues, unfortunately. |
ebf2446
to
e9f1882
Compare
e9f1882
to
487e52b
Compare
@alectrocute can I read more about the timezone issue anywhere? Maybe I can take a look at it as well |
The issues you linked earlier would be the best place to look, though it seems you've already done that. @alectrocute since the imports are fixed, getting the timezones working might actually be possible. |
With the current webpack configuration, Lemmy tries to load js files from paths where there aren't any, creating errors like:
Notice that it's loading from
/js/...
and not/static/js/...
This PR adds a
publicPath
config, which can be used to specify a base path for assets: https://webpack.js.org/guides/public-path/As far as I can tell, this fixes #1657 (at least it fixes it for me locally).
Note: I also noticed that the regex for including assets for the
ServiceWorkerPlugin
was only includidingclient.js
, I changed it to include all paths in thejs/
directory.