【发布时间】:2019-11-28 01:46:52
【问题描述】:
我想在我的 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 上接受的答案说要使用 {"compact": false} 配置 .babelrc 文件,但这不适用于 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
}
}
}
None 没有任何影响,并且总是导致 The code generator has deoptimised the styling 错误消息。我还将.babelrc 文件放入data-stubs 文件夹中,设置与上述相同,但这也不起作用。
【问题讨论】:
标签: ember.js babeljs ember-cli