I want to move some of utility functions and classes from my Ember app into a separate NPM library and import it with ember-auto-import
. I don't want to transpile the library code before publication but publish in authoring format. This shouldn't be an issue as ember-auto-import
transpiles the code automatically at build time depending on app's configuration.
But this code is experimental decorators feature as many Ember code these days does. Babel used by ember-auto-import
throws an error that the decorators-legacy
feature is not enabled:
Support for the experimental syntax 'decorators-legacy' isn't currently enabled
How can I enable it in the configuration of ember-auto-import
? I only see an option to disable transpilation per dependency and custom webpack configuration in ember-auto-import
's documentation. I don't have much experience with Webpack. Is babel controlled through Webpack configuration?
Aucun commentaire:
Enregistrer un commentaire