瀏覽代碼

docs: [semi-webpack] commonjs plugin usage

yanqi.xu 4 年之前
父節點
當前提交
ff35922288
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      packages/semi-webpack/README.md

+ 4 - 4
packages/semi-webpack/README.md

@@ -30,7 +30,7 @@ In order to use the NPM package, you need to customize the theme through [Semi D
 
 
 ``` js
 ``` js
 // webpack.config.js
 // webpack.config.js
-const SemiPlugin = require('@douyinfe/semi-webpack-plugin');
+const SemiPlugin = require('@douyinfe/semi-webpack-plugin').default;
 
 
 module.exports = {
 module.exports = {
     // ...
     // ...
@@ -57,7 +57,7 @@ $font-size-small: 16px;
 ``` js
 ``` js
 // webpack.config.js
 // webpack.config.js
 const path = require('path');
 const path = require('path');
-const SemiPlugin = require('@douyinfe/semi-webpack-plugin');
+const SemiPlugin = require('@douyinfe/semi-webpack-plugin').default;
 
 
 module.exports = {
 module.exports = {
     // ...
     // ...
@@ -72,7 +72,7 @@ module.exports = {
 #### Through parameters
 #### Through parameters
 ``` js
 ``` js
 // webpack.config.js
 // webpack.config.js
-const SemiPlugin = require('@douyinfe/semi-webpack-plugin');
+const SemiPlugin = require('@douyinfe/semi-webpack-plugin').default;
 
 
 module.exports = {
 module.exports = {
     // ...
     // ...
@@ -91,7 +91,7 @@ The css selectors used by SemiDesign is prefixed with semi by default(e.g, `.sem
 
 
 ``` js
 ``` js
 // webpack.config.js
 // webpack.config.js
-const SemiPlugin = require('@douyinfe/semi-webpack-plugin');
+const SemiPlugin = require('@douyinfe/semi-webpack-plugin').default;
 
 
 module.exports = {
 module.exports = {
     // ...
     // ...