Urara-Blog/node_modules/.pnpm-store/v3/files/8d/1c7d8e502da75f917e13eaca3b50f954a37ac85946b6ca50aa9d58803e873e1b55b4117777d795255b3a9ff8a8b87988b50eee541720b7f4c10181a8d6f7f7
2022-08-14 01:14:53 +08:00

18 lines
No EOL
381 B
Text

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isModule;
function isModule(path) {
const {
sourceType
} = path.node;
if (sourceType !== "module" && sourceType !== "script") {
throw path.buildCodeFrameError(`Unknown sourceType "${sourceType}", cannot transform.`);
}
return path.node.sourceType === "module";
}