UNPKG

next-csrf

Version:

CSRF mitigation library for Next.js

2 lines 867 B
"use strict";exports.__esModule=true;exports.default=NextPageDisallowReExportAllExports;function NextPageDisallowReExportAllExports(){return{visitor:{ExportAllDeclaration(path){var _ref,_path$node$loc$start,_path$node$loc,_path$node$loc2;const err=new SyntaxError(`Using \`export * from '...'\` in a page is disallowed. Please use \`export { default } from '...'\` instead.\n`+`Read more: https://err.sh/next.js/export-all-in-page`);err.code='BABEL_PARSE_ERROR';err.loc=(_ref=(_path$node$loc$start=(_path$node$loc=path.node.loc)===null||_path$node$loc===void 0?void 0:_path$node$loc.start)!==null&&_path$node$loc$start!==void 0?_path$node$loc$start:(_path$node$loc2=path.node.loc)===null||_path$node$loc2===void 0?void 0:_path$node$loc2.end)!==null&&_ref!==void 0?_ref:path.node.loc;throw err;}}};} //# sourceMappingURL=next-page-disallow-re-export-all-exports.js.map