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:
Reference for gulp task to bundle Javascript files: https://stackoverflow.com/questions/23835898/how-to-output-multiple-bundles-with-browserify-and-gulp
Please let us know if you have any other queries.
Regards,
Ezhil S
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
CH Christopher Hui
- Feb 9, 2017 11:19 PM UTC
- Feb 16, 2017 12:22 PM UTC