So it looks like the file I've asked it to convert is being converted correctly however the dependencies of that files remain as es6--any thoughts as to that for which I had not accounted?
Asked
Active
Viewed 32 times
0
-
not positive, have '--presets es2015,stage-2' settings wise, I guess es2015 then? and thank you! also, would you expect if babel is run one file, for all imported files linked to in the file to be transpiled as well? – Drew May 15 '17 at 05:41
-
how are you executing the transpile? Can we presume it's intended for running in node? Which version? – Yosef Weiner May 15 '17 at 05:43
-
have it a setup as a build script with 'cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress && babel server/lib -d dist --presets es2015,stage-2', and node v6.5.0 – Drew May 15 '17 at 05:44
-
This should help http://stackoverflow.com/a/31822668/4472840 – Yosef Weiner May 15 '17 at 05:48
-
ahh pardon looks like it's not actually able to understand the content of the import, i.e. unrecognized 'import' token in the one the included files if that helps (as opposed to not finding the file) – Drew May 15 '17 at 05:50
-
Babel doesn't transpile anything under node_modules by default, so it remains with the ES6 imports. Then at runtime, nodejs doesn't know how to parse that because it doesn't implement ES6 imports. – Yosef Weiner May 15 '17 at 05:52
-
actually a local file I had linked to, sorry, found the local file well :) haha – Drew May 15 '17 at 05:53