dom-utils icon indicating copy to clipboard operation
dom-utils copied to clipboard

Trouble with babel-preset-es2015

Open Westbrook opened this issue 7 years ago • 3 comments

I am applying this project as a part of https://github.com/philipwalton/analyticsjs-boilerplate in an application that is converting locally from babel-preset-es2015 to babel-preset-env and this is causing some compile time issues in this repo. Here in dom-utils the you are including babel-preset-es2015 as a devDependencies which means that it is not being installed for my parent project anymore, now that we've moved to babel-preset-env, however the .babelrc that is present requires it via: "presets": ["es2015"].

I think there are two possible solutions to this, moving babel-preset-es2015 to dependancies or to add an .npmignore that left .babelrc out of your published versions such that third parties can make their own decisions as to what babel settings to apply here. Thoughts?

I'd be happy to supply a PR if that was of benefit to resolving this issue.

Westbrook avatar Mar 19 '18 20:03 Westbrook

Can't you set the babelrc option to false in your config?

philipwalton avatar Mar 19 '18 21:03 philipwalton

I'll look at that option more closely, but I'm remiss to force all of the packages I depend on to not listen to their own .babelrc when only one package is causing issues.

Would a better solution be to follow babel's own suggestion as follows? " 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!"

Westbrook avatar Mar 20 '18 00:03 Westbrook

Hey.

Any update on this... ?

cyrilchapon avatar Oct 31 '18 15:10 cyrilchapon