Skip to content

Commit

Permalink
feat(alita): gatherInfo-laoder 配合cacheModuleInfos 收集信息
Browse files Browse the repository at this point in the history
  • Loading branch information
ykforerlang committed Dec 10, 2019
1 parent 5c3ffdd commit 3e55be2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/packByWebpack/gatherInfo-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {LoaderTmpResult} from './interfaces'
import configure from "../configure";
import {isReactComponent, parseCode} from "../util/uast"

import {setImEx} from '../util/cacheModuleImExInfo'
import {setModuleInfo} from '../util/cacheModuleInfos'
import {getLibCompInfos} from "../util/getAndStorecompInfos";
import {judgeLibPath} from "../util/util";

Expand All @@ -33,7 +33,7 @@ export default function (this: webpack.loader.LoaderContext, context: string):
const ast = parseCode(context, npath.extname(filepath))
const {isEntry, isRF, isFuncComp, imports, exports, JSXElements} = getFileInfo(ast, filepath)

setImEx(filepath, imports, exports, isRF, JSXElements)
setModuleInfo(filepath, imports, exports, isRF, isEntry, JSXElements)

return {
ast,
Expand Down Expand Up @@ -105,7 +105,7 @@ function getFileInfo(ast, filepath) {
})


if (isRF && !isEntry) {
if (!isEntry) {
// 处理小程序组件信息
// 必须在JSXElement收集结束之后 处理
traverse(ast, {
Expand Down

0 comments on commit 3e55be2

Please sign in to comment.