From e889a41e639d5a5379a98368bb721b0cb9a9ac4a Mon Sep 17 00:00:00 2001 From: Christian Kaisermann Date: Mon, 13 Jan 2020 21:44:08 -0300 Subject: [PATCH] Ignore annoying warning --- example/rollup.config.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/example/rollup.config.js b/example/rollup.config.js index b46dcee..dfe2080 100644 --- a/example/rollup.config.js +++ b/example/rollup.config.js @@ -13,10 +13,18 @@ const mode = process.env.NODE_ENV const dev = mode === 'development' const legacy = !!process.env.SAPPER_LEGACY_BUILD -const onwarn = (warning, onwarn) => - (warning.code === 'CIRCULAR_DEPENDENCY' && - /[/\\]@sapper[/\\]/.test(warning.message)) || +const onwarn = (warning, onwarn) => { + if ( + (warning.code === 'CIRCULAR_DEPENDENCY' && + /[/\\]@sapper[/\\]/.test(warning.message)) || + warning.code === 'THIS_IS_UNDEFINED' + ) { + return + } + onwarn(warning) +} + const dedupe = importee => importee === 'svelte' || importee.startsWith('svelte/')