I'm trying to run grunt-browserify. I keep getting the "path must be a string" error.
Here's my browserify task:
browserify: {
dist: {
files: {
"build/Hotspot.js" : ["lib/**/*.js"]
},
options: {
transform: ["babelify", {
presets: "es2015"
}]
}
}
},
This returns a Path must be a string error. However, if I change files to
"build/Hotspot.js" : ["/lib/**/*.js"]
the task runs, but none of the code seems to be transpiled or bundled. build/Hotspot.js is just the standard browserify error handling and nothing else.
Is there something I've done wrong in setting up my Gruntfile?
edit 1: I should note that lib/ exists and has files in it. Also, "./lib/**/*.js" yields the same error.
I think the clue to the solution is in the grunt-browserify docs, specifically:
I think this is telling us that in order to pass the options hash to a transform, the
options.tranformvalue must be an array of arrays: