/** * Created by kukuchong on 2017/11/8. */ const path = require('path'); const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const ExtractTextPlugin = require('extract-text-webpack-plugin') const CopyWebpackPlugin = require('copy-webpack-plugin'); const config = { context: path.join(__dirname, 'src'), entry: { 'app':'./index.js' }, output: { filename: '[n
We use lerna to seperate concernes into multiple packages. One of them is depending on two others to combine them in the final build. For production we build them independently and then put the dependencies into the node_modules directory of the first package. In development we do nothing special because babel-node from the first package seems to take care of the import statements also from the ot
v7.0.0-rc.3 (2018-08-24) https://twitter.com/left_pad/status/1031700991186489344 😂 💥 Breaking Change babel-preset-env #8509 Add browserslist 4 support.. (@yavorsky) babel-plugin-transform-runtime #8518 Make 'useESModules' only toggle CJS vs ESM helpers when importing file is ESM.. (@loganfsmyth) 🚀 New Feature babel-plugin-transform-runtime #8520 Expose opt-in useESModules:"auto" from transform-
v7.0.0-rc.0 (2018-08-09) EDIT: This had an issue with peerDependencies so please use rc.1. Alright finally at the end 🙂. Shouldn't have anymore breaking changes and going to wait some time to fix bugs/regressions Summary: @babel/polyfill will not include proposal polyfills by default and fixed a regression. 💥 Breaking Change babel-polyfill #8440 remove proposals polyfills from default import [sk
@babel/preset-stage-0 As of v7.0.0-beta.55, we've removed Babel's Stage presets. Please consider reading our blog post on this decision for more details. TL;DR is that it's more beneficial in the long run to explicitly add which proposals to use. For a more automatic migration, we have updated babel-upgrade to do this for you (you can run npx babel-upgrade). If you want the same configuration as b
error: bundling failed: Error: Requires Babel "^7.0.0-0", but was loaded with "6.26.3". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel. (While processing prese
Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? JSONは身近なフォーマットですが、手で書こうとすれば案外に書きにくいものです。実は、そういった問題をクリアするような「JSON5」というフォーマットがあって、しかも多くの人が利用可能な環境にあったりもします。 JSONの書きにくさ JSONはJavaScriptのオブジェクトリテラルから派生したものですが、データ交換用のフォーマットという性格もあってか、JavaScriptと比べて制約もあります。 オブジェクトのキーは二重引用符で括る必要がある(一重引用符や、何も書かないのは禁止) 文字列も二重引用符で括る必要がある(一重引用符は禁止
InfoType の作成にチャレンジしようと、下記ドキュメントを参考に、infomotion-tool を実行してみました。 Creating an InfoType https://docs.enebular.com/ja/infomotion/infomotiontool ES5 のテンプレート 出力された plugin.js には、下記のような、古き良き prototype を使用したクラス宣言が書かれています。 function DataLogger(settings, options) { : } DataLogger.prototype.addData = function(data) { : } DataLogger.prototype.render = function() { : } DataLogger.prototype.clearData = function()
はじめに Webpackの--modeごとにBabelのpresetsを設定する方法をメモします。 概要 環境 webpack : 4.21.0 webpack-cli : 3.1.2 @babel/core: 7.1.2 @babel/preset-env: 7.1.0 babel-loader: 8.0.4 ファイル配置 以下のファイルをプロジェクトディレクトリ直下に配置する。 package.json webpack.config.js babel.config.js 呼び出し方 npm scriptをコマンドラインから呼び出す。目的によってproductionモードとdevelopmentモードで呼び分ける。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く