I have written myself some utilities and wanna outsource them to a package so I can use them in multiple projects more easily. I would love to write an NPM package instead but the need to access meteor specific variables makes me use atmosphere.
Now I used some es7 like decorators and made them work with the babel-plugin-transform-decorators-legacy
plugin for babel. This works well in the project itself using a .babelrc
file but I couldn't make it work within the package I'm writing.
I always get the error
This experimental syntax requires enabling one of the following parser plugin(s): 'decorators-legacy, decorators'
but I couldn't figure out how I can enable the corresponding babel plugin.
Do I really have to refactor my code or is there a way to enable this plugin? :D
things I have tried:
- create an appropiate
.babelrc
file in package root directory - trying to hook into
ecmascript
- trying to use
@babel/core
instead