We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab3feb7 commit 26c56aeCopy full SHA for 26c56ae
lib/helpers.js
@@ -25,7 +25,9 @@ exports.srcEscape = srcEscape;
25
let highlightFn;
26
let cardinalRecommended = false;
27
try {
28
- highlightFn = require('cardinal').highlight;
+ // the purpose of this is to prevent projects using Webpack from displaying a warning during runtime if cardinal is not a dependency
29
+ const REQUIRE_TERMINATOR = '';
30
+ highlightFn = require(`cardinal${REQUIRE_TERMINATOR}`).highlight;
31
} catch (err) {
32
highlightFn = text => {
33
if (!cardinalRecommended) {
0 commit comments