mirror of
https://github.com/qlik-oss/nebula.js.git
synced 2025-12-19 17:58:43 -05:00
feat: supress "use client" warnings in charts build with nebula build watch (#1371)
This commit is contained in:
committed by
GitHub
parent
322523b8ab
commit
b2443642eb
@@ -67,10 +67,16 @@ const watch = async (argv) => {
|
||||
|
||||
const watcher = rollup.watch({
|
||||
...c.input,
|
||||
onwarn({ loc, message }) {
|
||||
onwarn({ loc, message, code }) {
|
||||
if (!hasWarnings) {
|
||||
clearScreen();
|
||||
}
|
||||
|
||||
// Supress "use client" warnings coming from MUI bundling
|
||||
if (code === 'MODULE_LEVEL_DIRECTIVE' && message.includes(`"use client"`)) {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(
|
||||
`${chalk.black.bgYellow(' WARN ')} ${chalk.yellow(
|
||||
loc ? `${loc.file} (${loc.line}:${loc.column}) ${message}` : message
|
||||
|
||||
Reference in New Issue
Block a user