問題タブ [karma-babel-preprocessor]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - RegeneratorRuntime が定義されていません
Karma-babel-preprocessorと単純な ES6 ジェネレーターを実行しようとしています。
これから、babel を使用してテスト ファイル (ES6 => ES5) を生成しました。
babel src --watch --out-dir tests
次に、実行するkarma start
とエラーが発生します:
ReferenceError: regeneratorRuntime が定義されていません".
karma.conf.js の関連ビット:
矢印を含む多くの ES6 機能を使用できます。ジェネレーターには行かないでください。
karma-runner - require を使用していなくても、Karma-babel require が定義されていません
私はこれを持っています:
しかし、カルマを実行するrequire is not defined
と、requireを使用していなくてもエラーが発生します。
何か案は?