build-plugin-antd is a legacy plugin designed for older build-scripts based build systems, specifically to integrate Ant Design components. It provides functionalities for customizing Ant Design's Less variables via `modifyVars` and automatically applies `babel-plugin-import` for on-demand loading of Ant Design components, helping to reduce bundle size. The package is currently at version 0.1.4, indicating it is an early release. Its release cadence is effectively stalled, with no recent updates indicated. It appears to be superseded by `@ice/plugin-antd` in the modern Ice.js ecosystem, which is part of the `@ice/app` framework. As such, `build-plugin-antd` is likely abandoned or in a state of indefinite maintenance. Its primary differentiator was simplifying Ant Design integration within the specific `build-scripts` environment it targeted.
npm install build-plugin-antdVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to configure `build-plugin-antd` within an `Ice.js` (or `build-scripts` compatible) project to enable Ant Design component on-demand loading and theme customization using Less `modifyVars`. It shows how the plugin is added to the `plugins` array and how Less options are applied.
Users are strongly advised to migrate their projects to use `@ice/plugin-antd` for active development, better compatibility, and access to the latest features. Refer to the `@ice/plugin-antd` documentation for setup instructions and migration guides.
Verify the compatibility of `babel-plugin-import` with your project's chosen bundler and transpiler. For modern setups, consider alternatives for Ant Design tree-shaking or ensure your build chain includes Babel for this specific plugin.
Ensure your project's Less loader configuration is aligned with the plugin's expectations. Explicitly set `javascriptEnabled: true` in your Less loader options and confirm that `modifyVars` are correctly applied by the build system.
For full compatibility with recent Ant Design versions and optimal performance, migrate to `@ice/plugin-antd`. If staying with `build-plugin-antd` is unavoidable, be prepared to manually configure `babel-plugin-import` and Less variables for newer Ant Design features.
Run `npm install build-plugin-antd` or `yarn add build-plugin-antd`. Ensure the plugin name is correctly spelled in your `build.config.js` or `ice.config.ts`.
If using ESM, ensure `import antdPlugin from 'build-plugin-antd';` is used. If CommonJS, `const antdPlugin = require('build-plugin-antd');`. Verify the plugin is correctly invoked as a function in the `plugins` array, e.g., `antdPlugin()`.Check your build configuration's Less loader settings. Ensure `javascriptEnabled: true` is set for Less compilation and that `modifyVars` are correctly passed through to the Less processor, either directly or via the plugin's options.