Incorrect path for assets defined in block.json (mu-plugin) #50651
Unanswered
meisemann1999
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This thread is very similar to my issue, although I am having trouble with this, even within a plugin: #40741
I am currently building a must-use plugin which includes several custom blocks, but I am encountering the same issue as was seen above with asset paths being correct. I have a local server (XAMPP) running on a Windows computer, where everything works correctly (defining each script/style as
file:./file.js
within block.json), but when everything is deployed and built on my staging server, which is an AWS instance running Debian, I get 404 errors in the console due to incorrect URLs, as seen in the thread linked above. On the remote server, the correct path is being appended to the end of the plugins directory, rather than the root of the server.Block.json (partial):
Requests tab in console:
Local server (Windows):
Remote server (Debian):
Beta Was this translation helpful? Give feedback.
All reactions