Closed wabain closed 2 years ago
Why isn't this PR merged in? The crash is very annoying. I appreciate this merging-in pretty soon.
Your potential appreciation of any 'pretty-soon' merging is duly noted. Thank you for informing us.
@pngwn I'm sorry if my comment made you feeling bad but I really do not get the reason why this PR is halting. Are there any issue or something unclear?
FYI: the crash won't happens when I don't use <script lang=ts>
. The compilation error will be caught by the other error handler:
https://github.com/sveltejs/svelte-loader/blob/79111a95f910dcdde7a8612334ee56c80653874e/index.js#L87-L89
I'm sorry if my comment made you feeling bad but I really do not get the reason why this PR is halting. Are there any issue or something unclear?
No other reason that we are very busy. We'll get around to it as soon as we can.
Fixes #197, which is caused by undefined being passed to the loader
addDependency
method when handling errors. A Svelte CompileError doesn't have afile
property, but it does havefilename
, so try either of those and calladdDependency
with the value if it is a string (and not equal to the path of the top-level resource being loaded).In addition to updating tests, I've checked manually that error reporting and rebuilding after an error works in a webpack project that had been hitting
ERR_INVALID_ARG_TYPE
before this patch.