Is there a way to opt out of ember-cli-babel entirely?
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- build-system, tooling
調査の方向性
まず、リンクされている issue 418、444、417、296、447 を読んで、ember-cli-babel の設定に関する既存の制限を理解します。次に、addon がどのように app をビルドし、ここで説明されている Babel 設定を処理しているかを調べます。必要な Ember transforms を維持したまま、transforms の無効化またはカスタマイズがサポートされているかどうかを明らかにできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Related issue: https://github.com/babel/ember-cli-babel/issues/418
just wondering, given the inability to use custom babel plugins, or not transpile class properties, (and a bunch of other bugs (some as old as 2019!), that seems to have been the result of ecosystem complacency in this tool in that it is "good enough", but ultimately does too much (babel-wise)).
- https://github.com/babel/ember-cli-babel/issues/444
- https://github.com/babel/ember-cli-babel/issues/417
- https://github.com/babel/ember-cli-babel/issues/418
- https://github.com/babel/ember-cli-babel/issues/296
- https://github.com/babel/ember-cli-babel/issues/447
Does it even make sense to not use ember-cli-babel?
minimally, this is all that's needed for the style of JS we write:
export default {
presets: ['@babel/preset-env'],
plugins: [
['@babel/plugin-proposal-decorators', { legacy: true }],
// ... @ember/debug removal
// ... @ember/deprecations removal
// ... ESM to AMD
]
};
What I removed from the above:
- class-properties -- this isn't needed because proposal-decorators doesn't need it, and browsers all natively support class properties. At least for development, removing this could speed up builds
- ember modules api polyfill -- since ember 3.27, the modules polyfill isn't needed. Less plugins, less faster build.
Eventually, given that I could eventually customize ember-cli-babel, I'd like to experiment with removing the ESM to AMD transform.
I know that addons can provide their own babel plugins / transforms, but, I don't think I'm at a point yet there addons' own configs even matter as I'm just trying to build the app and keep the Router in router.js as a native class with native properties, but today it looks like this:
;define("minimal-babel-demo/router", ["exports", "@ember/routing/router", "minimal-babel-demo/config/environment"], function (_exports, _router, _environment) {
"use strict";
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
class Router extends _router.default {
constructor(...args) {
super(...args);
_defineProperty(this, "location", _environment.default.locationType);
_defineProperty(this, "rootURL", _environment.default.rootURL);
}
}
_exports.default = Router;
Router.map(function () {});
});
IF we could use custom bebel configs, then the above could be minimally,
;define("minimal-babel-demo/router", ["exports", "@ember/routing/router", "minimal-babel-demo/config/environment"], function (_exports, _router, _environment) {
"use strict";
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;
class Router extends _router.default {
location = _environment.default.locationType;
rootURL = _environment.default.rootURL;
}
_exports.default = Router;
Router.map(function () {});
});
Which is _significantly smaller, and should be way less boot time for apps as well.
- 主要言語
- JavaScript
- スター
- 151
- フォーク
- 115
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
emberjs/ember-cli-babel のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
emberjs/ember-cli-babel#508 ·
-
Add support for Babel v8対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
emberjs/ember-cli-babel#535 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
emberjs/ember-cli-babel#533 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
emberjs/ember-cli-babel#519 · コメント 6 件 · リアクション 8 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
emberjs/ember-cli-babel#517 ·
emberjs/ember-cli-babel の issue をすべて見る
似ている issue
-
Websiteオープンgood first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 91/100
TanbirRamim/open-source-radar#314 ·
メンテナーはふだん 1 日以内に返信
-
prio: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
twentyhq/twenty#28826 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
status: needs triage
難易度 1/5 1〜3時間 初心者へのやさしさ 76/100
mastra-ai/mastra#28382 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
SolidGeeks/strata#21 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Yomguithereal/mnemonist#247 ·