Page 3 of 3

Re: SFS2X with Webpack

Posted: 10 Apr 2018, 16:23
by gopalrgpl
Bax wrote:The new version of the API (1.7.10) is now available here: http://www.smartfoxserver.com/download/sfs2x#p=client
We also published the NPM package here: https://www.npmjs.com/package/sfs2x-api


Thank you for the support

Re: SFS2X with Webpack

Posted: 11 Apr 2018, 05:11
by gopalrgpl
Bax wrote:The new version of the API (1.7.10) is now available here: http://www.smartfoxserver.com/download/sfs2x#p=client
We also published the NPM package here: https://www.npmjs.com/package/sfs2x-api



The package is good and working fine,

a small suggestion for the next release through npm.

Now the installed npm package contains the api file named as sfs2x-api-1.7.10.js, due to this the developer has to change the code manually

( for example if new release 1.7.11 is available , the developer has to change the version in bundler file(webpack,gulp ,grunt etc)
)

requiring the package every time, when smartfox updates its JavaScript library, so reducing the name to sfs2x-api.js would be great for next release of the library.

Re: SFS2X with Webpack

Posted: 11 Apr 2018, 07:07
by Bax
Actually I think you can import the library using the package name, instead of the file name.
We are using the following and it works fine (at least in webpack):

Code: Select all

import * as SFS2X from "sfs2x-api";

Re: SFS2X with Webpack

Posted: 11 Apr 2018, 07:21
by gopalrgpl
Bax wrote:Actually I think you can import the library using the package name, instead of the file name.
We are using the following and it works fine (at least in webpack):

Code: Select all

import * as SFS2X from "sfs2x-api";


Yeah its working in webpack thanks.
for pure javascript developers have to go in the above way i said.
Any way thanks for the support.