New to Webpack, help...

Post here your questions about the HTML5 / JavaScript for SFS2X

Moderators: Lapo, Bax

Ninjaoninja2
Posts: 189
Joined: 22 Sep 2013, 23:33

New to Webpack, help...

Postby Ninjaoninja2 » 27 May 2018, 16:08

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.
User avatar
Bax
Site Admin
Posts: 4409
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: New to Webpack, help...

Postby Bax » 28 May 2018, 07:42

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.
Paolo Bax
The SmartFoxServer Team
Ninjaoninja2
Posts: 189
Joined: 22 Sep 2013, 23:33

Re: New to Webpack, help...

Postby Ninjaoninja2 » 28 May 2018, 14:00

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.
User avatar
Bax
Site Admin
Posts: 4409
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: New to Webpack, help...

Postby Bax » 28 May 2018, 15:12

Could you please send a test project (using classic API, not webpack) showing the error? We would like to further investigate it.
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X HTML5 / JavaScript API”

Who is online

Users browsing this forum: No registered users and 1 guest