This demo shows how to bundle the yFiles library in a rollup project.
The yFiles modules are imported in the demo sources, so rollup will add the yFiles modules to
The HTML file just references the single
bundle.js file containing the demo code as well as all
Additionally, the yFiles optimizer is run before bundling to achieve a smaller, production ready bundle.
Building the demo
If grunt is not available on the command line, install
> npm install -g grunt-cli
Install the required npm packages and run the default task of the Gruntfile:
> npm install > grunt
Note that rollup may require more heap memory when bundling the yFiles library than available by default. To
increase the available memory, set the
--max-old-space-size Node parameter to at least
Running the demo
The grunt build will place the output files in the
dist/ directory inside this demo folder. To run
the demo, open
./index.html in a browser.