Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? 概要 babel-plugin-lodashは、babelのトランスパイル時にlodashのimportを個別の関数のimportに変換してくれるプラグインです。個別の関数のimportにすることで、スクリプトバンドルのサイズを抑えることができます。 変換対象としてlodash以外のパッケージを指定することができ、条件を満たしたパッケージであれば、lodashと同様に必要なオブジェクトだけをバンドルに含めるように変換することができます。これにより、大幅にバンドルのサイズを削減できる場合があります。 実際にサンプルを作って試してみたところ
babel-preset-env is a new preset that lets you specify an environment and automatically enables the necessary plugins. The problem # At the moment, several presets let you determine what features Babel should support: babel-preset-es2015, babel-preset-es2016, etc.: incrementally support various versions of ECMAScript. es2015 transpiles what’s new in ES6 to ES5, es2016 transpiles what’s new in ES2
この一か月分の学習成果を整理したリポジトリを作ったので、その成果についてまとめておく。 作ったサンプルプロジェクトだけを手軽に欲しければ、このリポジトリを clone してほしい。 taichi/js-boilerplate master ブランチには、ミニマムな JavaScript 開発環境がサンプルコード付きで入っている frontend ブランチには、React/Redux/webpackなウェブアプリケーション用の開発環境が入っている デフォルトブランチにしてある electron ブランチには、frontend ブランチの内容に加えてElectronでアプリケーションを開発するための環境が入っている はじめに 最近の JavaScript について 僕は仕事として JavaScript を書いている訳ではないけども、この半年くらいの間にちょっとしたツールならいくつか作った。
Some History Current Status The Future Community Previous issues: Babel Roadmap #4130, 6.0 #2168 Please check out the Community section if nothing else. Also published as part of Mariko Kosaka's 2016 Web Advent Calendar! Some History Sebastian created "6to5" in September of 2014. Interestingly enough, he made it to scratch an itch he had with understanding programming languages and how they work.
babel-polyfillとbabel-runtimeの使い分けに迷ったので調べた の続編・追加調査。 使い分け的なのわかったものの、未だにどうにも困りごとが多いので、更に深掘りしてみた。 それぞれのおさらい & 困りごと polyfillのページで改めておさらいしつつ、それぞれの困りごとを書いてみる babel-polyfill core-jsとregenerator-runtimeを読み込んでいる polyfillとして、windowグローバルを拡張する仕組み 困りごと 複数ファイルからロードするとthrow errorされてしまうので、うっかりしてるとハマるので気を使う 上記のような問題のため、ブラウザの場合は、別途dist/polyfill.jsなど、別管理してを読み込む。 require('babel-polyfill')の様にコードベース上から読み込むことは推奨されてない。
the blazing fast, batteries-included ES2015 compiler What is Bublé? Bublé is an ES2015+ compiler. It takes your ES2015/16 JavaScript code and turns it into code that can run in today's environments, including old versions of Node.js and Internet Explorer. As the name suggests, Bublé is heavily inspired by (and indebted to) Babel – but there are some key differences: Bublé limits itself to ES featu
私は Web フロントエンドのテストで mocha + power-assert + espower-babel を組み合わせて利用しているのだが、これらのうち espower-babel が Deprecated になった。経緯と代替については以下の記事にまとまっている。 power-assert + babel as a development tool これからは espower-babel 代わりに babel-register と babel-preset-power-assert を利用。babel-register で require をフックして assert を power-assert へ置き換える。この処理が Babel ビルドの一環として実行されるようになった、という理解でよいのだろうか。 移行には npm 更新、.babelrc と mocha.opt 修正が必要
Maintenance status Bublé was created when ES2015 was still the future. Nowadays, all modern browsers support all of ES2015 and (in some cases) beyond. Unless you need to support IE11, you probably don't need to use Bublé to convert your code to ES5. Since IE11 is an unfortunate reality for some people, we will continue to release bugfixes, but new features won't be added unless in exceptional circ
JSDocをassertに変換するライブラリとそれを使ったBabelプラグインを書きました。 azu/babel-plugin-jsdoc-to-assert: Babel plugin for jsdoc-to-assert. azu/jsdoc-to-assert: JSDoc to assert ライブラリのjsdoc-to-assertの方は、JavaScript ASTのコメントからassertの文字列を作り出すだけのシンプルなものです。 実際に使う場合は、Babelのプラグインとしてbabel-plugin-jsdoc-to-assertを使い、コードを変換してランタイムassertを追加させます。 やっていることとしては、FlowTypeをランタイムチェックするbabel-plugin-typecheckのJSDoc版とも言えます。 babel-plugin-typechec
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く