We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

syncfusion reactjs with browserify

how can i require/bundle syncfusion reactjs with browserify?

3 Replies

AP Arun Palaniyandi Syncfusion Team February 10, 2017 03:09 PM UTC

Hi Christopher , 
 
Thanks for contacting Syncfusion support. 
 
We can bundle Syncfusion components with the browserify in React project by the following steps. 
 
1.       Create an application and then include the npm node packages. 
2.       Create a project directory with source and build folders. And  then in the index.html file include all the Syncfusion dependent scripts and styles . 
3.       If you are using ES2015 for rendering, then you need not refer “react.min.js”, “react-dom.min.js” and “browser.min.js” files in index.html. 
4.       Then create the component under the src folder. 
5.       Now give the browserify commands and then build the application. 
6.       Finally the Syncfusion components will be bundled with browserify in React project 
 
 
We have created our Autocomplete component using the Reactjs  browserify for your reference below. 
 
 
you can also find more information in the below getting started link. 
 
 
 
If the provided sample does not meet your requirement, please give more information on your requirement for us to provide the solution at earliest.  
  
 
Regards, 
Arun P. 



CH Christopher Hui February 10, 2017 04:52 PM UTC

i want to just have one bundle.js file. inside the index.html, i do not want the react javascript files referenced.


ES Ezhil S Syncfusion Team February 16, 2017 12:22 PM UTC

Hi Christopher, 

Thanks for your update. 

Yes, we can bundle all the dependent script to one using gulp task and refer it to your index page. Configure your app for gulp task and bundling with browserify using the “browserify” command. We have modified the sample with bundling the dependent scripts and it can be downloaded from the link below: 
 
 
Please let us know if you have any other queries. 
 
Regards, 
Ezhil S 


Loader.
Live Chat Icon For mobile
Up arrow icon