Skip to content

Commit

Permalink
docs(site): update Pack on Demand doc (#2086)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouxinyong authored Sep 2, 2021
1 parent 7acb5f7 commit c0c50ac
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 8 additions & 4 deletions docs/guide/advanced/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ export default {
[
'babel-plugin-import',
{ libraryName: 'antd', libraryDirectory: 'es', style: true },
'antd',
],
[
'babel-plugin-import',
{ libraryName: '@formily/antd', libraryDirectory: 'esm', style: true },
'@formily/antd',
],
],
}
Expand Down Expand Up @@ -92,12 +94,12 @@ modify `config-overrides.js`
- return config;
- };
+ module.exports = override(
+ fixBabelImports('import', {
+ fixBabelImports('antd', {
+ libraryName: 'antd',
+ libraryDirectory: 'es',
+ style: true
+ }),
+ fixBabelImports('import', {
+ fixBabelImports('@formily/antd', {
+ libraryName: '@formily/antd',
+ libraryDirectory: 'esm',
+ style: true
Expand Down Expand Up @@ -130,15 +132,17 @@ Modify `.babelrc` or babel-loader
"libraryName": "antd",
"libraryDirectory": "es",
"style": true
}
},
"antd"
],
[
"import",
{
"libraryName": "@formily/antd",
"libraryDirectory": "esm",
"style": true
}
},
"@formily/antd"
]
]
}
Expand Down
12 changes: 8 additions & 4 deletions docs/guide/advanced/build.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ export default {
[
'babel-plugin-import',
{ libraryName: 'antd', libraryDirectory: 'es', style: true },
'antd',
],
[
'babel-plugin-import',
{ libraryName: '@formily/antd', libraryDirectory: 'esm', style: true },
'@formily/antd',
],
],
}
Expand Down Expand Up @@ -92,12 +94,12 @@ yarn add babel-plugin-import --dev
- return config;
- };
+ module.exports = override(
+ fixBabelImports('import', {
+ fixBabelImports('antd', {
+ libraryName: 'antd',
+ libraryDirectory: 'es',
+ style: true
+ }),
+ fixBabelImports('import', {
+ fixBabelImports('@formily/antd', {
+ libraryName: '@formily/antd',
+ libraryDirectory: 'esm',
+ style: true
Expand Down Expand Up @@ -130,15 +132,17 @@ yarn add babel-plugin-import --dev
"libraryName": "antd",
"libraryDirectory": "es",
"style": true
}
},
"antd"
],
[
"import",
{
"libraryName": "@formily/antd",
"libraryDirectory": "esm",
"style": true
}
},
"@formily/antd"
]
]
}
Expand Down

0 comments on commit c0c50ac

Please sign in to comment.