Before starting to use Vue (using the Akryum:vue-component code et al), I’ve been very happy with the techniques described by the Meteor testing guide and in particular by Pete Corey at the two urls below:
These techniques produced fast unit tests for both client and server code.
However now I’ve switched to Vue I’m getting this message:
SyntaxError: /pathto/imports/ui/AppLayout.vue: Unexpected token (1:0)
This is caused by a .vue component, which contains both “template” and “script” tags, both of which my current testing efforts do not like.
I’ve spend three days reading all over the place to try and solve the problem, but it seems that the only possible solutions involve either webpack or browserify.
My question is: is there a way of dealing with the problem without resorting to Webpack?
One of the reasons I like Meteor (there are several reasons) is because - as Sashko says “You don’t need a degree in Webpack”, and I really do not want to start using it, if it can be avoided.
However presumably the .vue component needs compiling before it can be tested.
In reality I am not interested at this stage in testing anything in the template tag. All I would like to do for the moment is get at the exported code in the script tag. Is that possible without webpack?