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/')