You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.
ERROR in ./index.php
Module build failed (from (webpack)-php-loader/index.js):
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at runPhp (/my/project/path/node_modules/webpack-php-loader/index.js:69:10)
My index.php file works fine when being served on it's own. Any ideas what this could be? Is it an issue with the plugin not being compatible with Webpack 4?
The text was updated successfully, but these errors were encountered:
The role of this code snippet is to add all required php files and add them as dependencies files to webpack (for recompliation on files changes), but if php throw a fatal error before end of stack, the dependencies can't be getted
I've not the time to add a try{} catch{} block around and eventually a shutdown callback to catch fatal error, but if you want, you can try to fork the repo and propose a pull request ;)
else you can always ensure that your php code is executed without errors before trying to load it with webpack-php-loader
on the other hand I developped it on webpack 3 and never tested on webpack 4, but I see no reason that can break it
Thanks for the super fast reply! Let me double check my PHP as I was pretty sure it was fine... If that isn't the case I'll see if I can get time at work to have a look at the codebase.
Aside from creating broken PHP code are they any other things you can think of that could be the cause?
On line 69 of the plugin there is;
My
index.php
file works fine when being served on it's own. Any ideas what this could be? Is it an issue with the plugin not being compatible with Webpack 4?The text was updated successfully, but these errors were encountered: