Hi,
When running gulp-production we are getting this error, in development mode it works fine.
Hey @azhard4int , please can you explain how are you doing in development? I would suggest to follow https://github.com/rowanwins/vue-dropzone#development this steps. Just need to know what exactly you are doing (some steps) so I can better assist your issue.
Thanks
I am using gulp along with laravel, everything run fine in the watch mode. When we run the gulp in production the error comes up. It only happens due to the minified verison.
I have just used the non-minified version in my project and ran the gulp in production mode it works fine so far.
@azhard4int I believe this error is not related to vue2-dropzone. For more I'll suggest you need to dig into stacktrace to verify which module/library/component is responsible for this issue.
Gday @azhard4int
Im going to close this issue as it's likely to do with the gulp minification process.
Depending on which gulp minifiers you are using sometimes they can do some strange things so perhaps try swapping to a different minifier, or adjusting the settings on the one you are using. Posting info about the error you are recieving might enable someone to provide further assistance.
I just ran into this issue as well with Elixir. It's being caused by uglifyjs incorrectly mangling a line of the dropzones source in dist/vue2-dropzone.js
In my case I added the mangle properly to the elixir config to exclude the offending variable name. It's a bit hacky but it works.
Here's the line in vue2-dropzone that was causing the error for me -
e[0].status!==t.CANCELED&&4===B.readyState
Uglify was converting the e[0] to r[0] which is what was causing the error.
My fix:
elixir.config.js.uglify.options = {
compress: {
drop_console: elixir.inProduction,
},
mangle: {
except: ['e']
}
}
Thanks for the tip @stoked74
Most helpful comment
I just ran into this issue as well with Elixir. It's being caused by uglifyjs incorrectly mangling a line of the dropzones source in dist/vue2-dropzone.js
In my case I added the mangle properly to the elixir config to exclude the offending variable name. It's a bit hacky but it works.
Here's the line in vue2-dropzone that was causing the error for me -
e[0].status!==t.CANCELED&&4===B.readyStateUglify was converting the e[0] to r[0] which is what was causing the error.
My fix: