In a traditional Ember app, I have something along the lines of this in my ember-cli-build.js
:
//ember-cli-build.js
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
babel: {
includePolyfill: true,
ignore: ['my-ember-ui/models/myFile.js'] // <-- question is here
},
Is there an equivalent to this when using an Ember Engine (or addon)? I couldn't find anything within ember-cli-babel or ember-engines.
I understand that ember-cli-build.js
is just for the dummy app when using an engine, so I wouldn't make the change there. I attempted similar to above in the index.js
file, but did not have any luck. The file was not ignored by babel. I need a way to ignore a particular file. Thanks!
Well, adding new rules to Cli.build.js is ok depends on what you want to do. However, I may have another solution that you can give it a try.
Babel will look for a
.babelrc
in the current directory of the file being transpiled. If one does not exist, it will travel up the directory tree until it finds either a.babelrc
, or apackage.json
with a"babel": {}
hash within.(.babelrc files are serializable JSON).or
There should be another way which seems ok to use. the following does work:
For more information, you can read Babel document