0đź‘Ť
âś…
Okay after spending about a day pulling my hair out, I finally figured out what was going on. The problem ended up being… in my compilation command!!!
Here’s what I was doing:
browserify -t vueify -e src/main.js -o build/hello.js
HOWEVER, in the package.json file, I was specifying this:
"browserify": {
"transform": [
"babelify",
"vueify", //Hey, aren't I already in the compilation command?
"browserify-shim"
]
},
You’ll notice that all of the necessary transformations are already defined. So this makes the -t vueify
option in the compilation command error out because the code gets “vueified” twice, resulting in all sort of strange errors, including the one that’s been bugging me out. So in the end, the only thing that needed to be done was:
browserify -e src/main.js -o build/hello.js
I hope this helps someone in the future.
👤Osuwariboy
Source:stackexchange.com