next-with-linaria
Version:
Linaria support for Next.js App Router
17 lines • 839 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.performFastCheck = performFastCheck;
const consts_1 = require("../loaders/consts");
const logger_1 = require("./logger");
let fastCheckMessageShown = false;
function performFastCheck(content, fastCheck = true) {
if (fastCheck && !fastCheckMessageShown) {
logger_1.logger.info('Linaria fastCheck optimization enabled - skipping transform for files without Linaria syntax.');
logger_1.logger.info('If you experience styling issues, try disabling fastCheck in your next.config file.');
fastCheckMessageShown = true;
}
const hasLinariaSyntax = consts_1.regexLinariaSyntaxPattern.test(content);
const shouldTransform = !fastCheck || hasLinariaSyntax;
return shouldTransform;
}
//# sourceMappingURL=fast-check.js.map