From c0c50aceeeb1bb78b099dbf1b79a2699817f40a1 Mon Sep 17 00:00:00 2001 From: vimvinter Date: Thu, 2 Sep 2021 11:12:01 +0800 Subject: [PATCH] docs(site): update Pack on Demand doc (#2086) --- docs/guide/advanced/build.md | 12 ++++++++---- docs/guide/advanced/build.zh-CN.md | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/docs/guide/advanced/build.md b/docs/guide/advanced/build.md index ef5c0eb6f61..8efa5745fa4 100644 --- a/docs/guide/advanced/build.md +++ b/docs/guide/advanced/build.md @@ -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', ], ], } @@ -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 @@ -130,7 +132,8 @@ Modify `.babelrc` or babel-loader "libraryName": "antd", "libraryDirectory": "es", "style": true - } + }, + "antd" ], [ "import", @@ -138,7 +141,8 @@ Modify `.babelrc` or babel-loader "libraryName": "@formily/antd", "libraryDirectory": "esm", "style": true - } + }, + "@formily/antd" ] ] } diff --git a/docs/guide/advanced/build.zh-CN.md b/docs/guide/advanced/build.zh-CN.md index 2bf6dd8f46b..2a2d39736a0 100644 --- a/docs/guide/advanced/build.zh-CN.md +++ b/docs/guide/advanced/build.zh-CN.md @@ -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', ], ], } @@ -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 @@ -130,7 +132,8 @@ yarn add babel-plugin-import --dev "libraryName": "antd", "libraryDirectory": "es", "style": true - } + }, + "antd" ], [ "import", @@ -138,7 +141,8 @@ yarn add babel-plugin-import --dev "libraryName": "@formily/antd", "libraryDirectory": "esm", "style": true - } + }, + "@formily/antd" ] ] }