kdu
Which dist file to use?
From CDN or without a Bundler
With a Bundler
Bundler Build Feature Flags
Starting with 3.0.0, esm-bundler builds now exposes global feature flags that can be overwritten at compile time:
__KDU_OPTIONS_API__ (enable/disable Options API support, default: true)
__KDU_PROD_DEVTOOLS__ (enable/disable devtools support in production, default: false)
The build will work without configuring these flags, however it is strongly recommended to properly configure them in order to get proper tree-shaking in the final bundle. To configure these flags:
Note: the replacement value must be boolean literals and cannot be strings, otherwise the bundler/minifier will not be able to properly evaluate the conditions.
For Server-Side Rendering
kdu.cjs(.prod).js:
- For use in Node.js server-side rendering via
require().
- If you bundle your app with webpack with
target: 'node' and properly externalize kdu, this is the build that will be loaded.
- The dev/prod files are pre-built, but the appropriate file is automatically required based on
process.env.NODE_ENV.