Saturday 6 May 2017

es6 not working for my custom npm module

I've just extracted part of my javascript app (written in Vue2 and nuxt.js but that's not important) to an external npm package.

My main app is using babel for es6 code and all the files written in that package are using es6 syntax. The problem is - after extracting es6 code to an external npm module, uglifyjs started to complain about their syntax. Errors suggests that uglify treats them as regular javascript files, not es6.

How can i tell node to treat my package files as es6?



via mbajur

No comments:

Post a Comment