-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Open
Description
$ electron-mocha --renderer -R spec --require @babel/register --require-main "test/setup/main.js" --preload "test/setup/renderer.js" "test/*.spec.js" "test/*.spec.ts" "test/**/*.spec.js"
Unexpected identifier
~/gui/packages/desktop/test/keyframe-animation.spec.ts:1
(function (exports, require, module, __filename, __dirname, process, global, Buffer) { return function (exports, require, module, __filename, __dirname) { import KeyframeAnimation from '../src/main/keyframe-animation';
^^^^^^^^^^^^^^^^^
SyntaxError: Unexpected identifier
Compilation actually works
yarn workspace desktop private:compile
yarn workspace v1.10.1
yarn run v1.10.1
$ babel src/ --copy-files --out-dir build --extensions ".ts,.tsx,.js"
Successfully compiled 79 files with Babel.
babel.config.js
module.exports = function (api) {
api.cache(true);
return {
"presets": [
["@babel/preset-env", {
"targets": { "electron": "3.0" }
}],
"@babel/preset-react",
"@babel/preset-typescript",
"@babel/preset-flow"
],
"plugins": [
"@babel/plugin-proposal-class-properties"
]
};
};
danielpza