Ignore annoying warning

This commit is contained in:
Christian Kaisermann 2020-01-13 21:44:08 -03:00
parent 788a2c67df
commit e889a41e63

View File

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