Skip to content

Commit

Permalink
docs: babel-types 的省略
Browse files Browse the repository at this point in the history
  • Loading branch information
okbug committed Nov 20, 2021
1 parent a03ffe0 commit 986180a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion learnWebpack/ast-demo/3.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const core = require('@babel/core');
const types = require('babel-types');
// const types = require('babel-types');
const {types} = core
const plugin2 = require('@babel/plugin-transform-classes');


Expand Down
7 changes: 7 additions & 0 deletions learnWebpack/ast-demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,11 @@ const myClassTransformPlugin = {
}
}
}
```

> babel-types 不用安装,core里面其实也有
```js
// const types = require('babel-types');
const {types} = core
```

0 comments on commit 986180a

Please sign in to comment.