Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(customStyleName): 完善customStyleName传参 #603

Merged
merged 3 commits into from
Apr 11, 2022

Conversation

DawnLck
Copy link
Contributor

@DawnLck DawnLck commented Apr 1, 2022

补充了file参数,使得开发者能自己控制 style 文件的路径转化,如下

import customName from './customName';
export default defineConfig({
  library: {
    esm: 'babel',
    extraBabelPlugins: [
      [
        'babel-plugin-import',
        {
          libraryName: 'antd',
          libraryDirectory: 'es',
          style: true,
          customStyleName: (name: string, file: Record<string, any>, ...args: any) => { 
               // do something
          },
        },
      ],
    ],
  },
});

@afc163 afc163 requested a review from sorrycc April 1, 2022 03:17
@afc163
Copy link
Contributor

afc163 commented Apr 1, 2022

补个用例

@sorrycc sorrycc merged commit 469c018 into umijs:master Apr 11, 2022
zhanguangao pushed a commit to zhanguangao/babel-plugin-module-federation-import that referenced this pull request Sep 1, 2023
* feat(customStyleName): 完善customStyleName传参

* test(customStyleName): 提供customStyleName传入file参数的测例

* test(customStyleName): 补充customStyleName 的分支测例
This was referenced Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants