Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/component/.fatherrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,14 @@ export default defineConfig({
// 使用 babel 编译 esm/cjs 产物,启用 transform-import-css-l7 插件完成 CSS 内联打包
esm: { transformer: 'babel' },
cjs: isProduction ? { transformer: 'babel' } : undefined,
// 确保 CSS 被打包到产物中而不是直接引用 less 源文件
extraBabelPlugins: [
[
// import glsl as raw text
'babel-plugin-inline-import',
{ extensions: '.glsl' },
],
Comment on lines +12 to +16

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The babel-plugin-inline-import for .glsl files appears to be unnecessary for the @antv/l7-component package. This package primarily contains UI components (Markers, Popups, Controls) which do not seem to use GLSL shaders. Adding unused plugins can slightly increase build times and adds unnecessary complexity to the configuration. If this was copied from another package like l7-layers, it should be removed here.

    // import css as inline
    'transform-import-css-l7',

// import css as inline
'transform-import-css-l7',
],
});
Loading