(err: CompilerError, asWarning = false)
| 77 | ) |
| 78 | |
| 79 | function onError(err: CompilerError, asWarning = false) { |
| 80 | const message = asWarning |
| 81 | ? err.message |
| 82 | : `Template compilation error: ${err.message}` |
| 83 | const codeFrame = |
| 84 | err.loc && |
| 85 | generateCodeFrame( |
| 86 | template as string, |
| 87 | err.loc.start.offset, |
| 88 | err.loc.end.offset, |
| 89 | ) |
| 90 | warn(codeFrame ? `${message}\n${codeFrame}` : message) |
| 91 | } |
| 92 | |
| 93 | // The wildcard import results in a huge object with every export |
| 94 | // with keys that cannot be mangled, and can be quite heavy size-wise. |
no test coverage detected