Use of try/catch when using loadModule to catch errors in .vue files #103
-
Hi, instead of using loadModule as described in the documentation, I have created my own function in order to try to catch things such as syntax errors in .vue files. This works slightly better than loadModule. When I deliberately add an extra { bracket to cause an error, it displays: SyntaxError: Unexpected token (2:20) However, it doesn't give me information such as which .vue file and which line it occurs on. Any ideas on how to pick up these errors better?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I think I've just answered my own question, by looking at one of the examples. I needed to put this in my options object:
That produces a better console log, in addition to the syntax error:
|
Beta Was this translation helpful? Give feedback.
I think I've just answered my own question, by looking at one of the examples. I needed to put this in my options object:
That produces a better console log, in addition to the syntax error: