rollup: also suppress CIRCULAR_DEPENDENCY warnings on Windows

This commit is contained in:
Conduitry
2019-06-14 11:36:30 -04:00
committed by GitHub
parent a1b567dc08
commit 07fc656bba

View File

@@ -11,7 +11,7 @@ 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' && warning.message.includes('/@sapper/')) || onwarn(warning);
const onwarn = (warning, onwarn) => (warning.code === 'CIRCULAR_DEPENDENCY' && /[/\\]@sapper[/\\]/.test(warning.message)) || onwarn(warning);
export default {
client: {