Ember-cli忽略选项.babelrc

问题描述 投票:0回答:1

我想在Ember应用程序中将babel选项配置为忽略data-stubs文件夹,或者将compact设置为false,以便在构建过程中使以下错误消失:

[Babel: my-app > applyPatches][BABEL] 
 Note: The code generator has deoptimised the styling of dev/my-app/tests/data-stubs/foo.js
 as it exceeds the max of 500KB.

[StackOverflow上的可接受答案表示使用.babelrc配置{"compact": false}文件,但不适用于ember-cli构建。参考答案:BABEL Note: The code generator has deoptimised the styling of "app.js" as it exceeds the max of "100KB in Meteor

我在ember应用程序的根文件夹中制作了一个.babelrc文件,并尝试了许多不同的配置:

{
  "ignore": ["**/data-stubs/*.js", "tests/data-stubs/*", "*tests/data-stubs/*"], //do not translate our stub files
  "compact": false,
  "env": {
    "development": {
      "compact": false
    }
  }
}

没有任何作用,并且总是导致The code generator has deoptimised the styling错误消息。我还将.babelrc文件放入与上述相同设置的data-stubs文件夹中,该文件也无效。

ember.js babel ember-cli
1个回答
0
投票

这是预期的。灰烬使用ember-cli-babel在文档中声明:

© www.soinside.com 2019 - 2024. All rights reserved.