Page 1 of 1

New to Webpack, help...

Posted: 27 May 2018, 16:08
by Ninjaoninja2
Hello,
I'm not sure what's going on, I've never used webpack so I'm kind of frustrated.

I'm getting this odd error when trying to use the SFS2X JS API 1.7.11 from the official client api list, complaining about this:

Error while fetching an original source: TypeError: NetworkError when attempting to fetch resource.
Source URL: webpack://SFS2X/src/core/Exceptions.js

At first it was complaining about not having the .map file, so I put that in the folder with the api's .js file. And now I'm having a LoginRequest Error that I can't debug because it points to an "Exceptions.js" file which when opened in the debug section of the firefox inspect element console, prints the above error.

It seems like for people like me, who don't want anything to do with webpack, it makes it make it much more complicated.

Re: New to Webpack, help...

Posted: 28 May 2018, 07:42
by Bax
I thinks this might be an issue with the generation of the source map of your project, which in turn should embed the API source map.
I suggest to follow the setup of the project in this example: http://docs2x.smartfoxserver.com/Exampl ... pm-webpack
In any case you are not forced to use Webpack. We will continue supporting the classic API usage method.

Re: New to Webpack, help...

Posted: 28 May 2018, 14:00
by Ninjaoninja2
Bax wrote:I thinks this might be an issue with the generation of the source map of your project, which in turn should embed the API source map.
I suggest to follow the setup of the project in this example: http://docs2x.smartfoxserver.com/Exampl ... pm-webpack
In any case you are not forced to use Webpack. We will continue supporting the classic API usage method.

When trying to use the classic api method, it still asks for the source map, and then the same error appears. In any case, I did follow the example and am getting the same thing.

Re: New to Webpack, help...

Posted: 28 May 2018, 15:12
by Bax
Could you please send a test project (using classic API, not webpack) showing the error? We would like to further investigate it.