@areslabs/alita-core
Version:
alita-core
41 lines (36 loc) • 864 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _index = _interopRequireDefault(require("../precheck/index"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Copyright (c) Areslabs.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
/**
* 由于alita 并不能对所有JSX写法兼容,所以这里需要预检测
* @param {string} context
* @returns {LoaderTmpResult}
*/
function _default(context) {
const filepath = this.resourcePath;
const {
isEntry,
isRF,
isFuncComp,
ast,
rawCode
} = context;
(0, _index.default)(ast, isEntry, isRF, filepath, rawCode);
return {
ast,
isEntry,
isRF,
isFuncComp
};
}