Description:
Starting in v2.24.0, @antv/l7-component/es/index.js has an
active .less import:
import "./css/index.less";
In v2.23.x and earlier, this was commented out:
// import './css/index.less';
This breaks builds for any project that depends on @antv/l7
transitively (e.g. via @ant-design/maps or
@ant-design/charts) without having less installed as a dev
dependency.
Error: Preprocessor dependency "less" not found. Did you
install it?
Expected behavior:
Published ES module builds should ship compiled CSS
(index.css), not preprocessor source files. Consumers should
not need to install less to use this package.
Reproduction:
- Install @ant-design/charts (which pulls @ant-design/maps →
@antv/l7 → @antv/l7-component)
- Build with Vite (or any bundler) without less installed
- Build fails on @antv/l7-component/es/css/index.less
Workaround:
Pin @antv/l7 and @antv/l7-component to 2.23.2 via yarn/npm
resolutions.
Versions affected: 2.24.0 – 2.25.4 (latest)
Description:
Starting in v2.24.0, @antv/l7-component/es/index.js has an
active .less import:
import "./css/index.less";
In v2.23.x and earlier, this was commented out:
// import './css/index.less';
This breaks builds for any project that depends on @antv/l7
transitively (e.g. via @ant-design/maps or
@ant-design/charts) without having less installed as a dev
dependency.
Error: Preprocessor dependency "less" not found. Did you
install it?
Expected behavior:
Published ES module builds should ship compiled CSS
(index.css), not preprocessor source files. Consumers should
not need to install less to use this package.
Reproduction:
@antv/l7 → @antv/l7-component)
Workaround:
Pin @antv/l7 and @antv/l7-component to 2.23.2 via yarn/npm
resolutions.
Versions affected: 2.24.0 – 2.25.4 (latest)