UNPKG

next-with-linaria

Version:
17 lines 835 B
"use strict"; 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 webpack config'); fastCheckMessageShown = true; } const hasLinariaSyntax = consts_1.regexLinariaSyntaxPattern.test(content); const shouldTransform = !fastCheck || hasLinariaSyntax; return shouldTransform; } //# sourceMappingURL=fast-check.js.map