diff --git a/register.js b/register.js index 3278c1cbf5..868d47be0f 100644 --- a/register.js +++ b/register.js @@ -36,7 +36,16 @@ function registerExtension(extension) { format: 'cjs' }); - const { js } = compile(fs.readFileSync(filename, 'utf-8'), options); + const { js, warnings } = compile(fs.readFileSync(filename, 'utf-8'), options); + + if (options.dev) { + warnings.forEach(warning => { + console.log(`\nSvelte Warning in ${warning.filename}:`); + console.log(warning.message); + console.log(warning.frame); + }) + } + return module._compile(js.code, filename); };