How can use babel decorator ? Error in need decoratorsBeforeExport option
"electron-builder": "^22.4.1", "electron-webpack": "^2.8.2",
-
Version:
electron 10+ osx 10.14+
- Target: osx
ERROR in ./src/renderer/index.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: [BABEL] /Users/lin/Documents/mylab/electron-webpack-quick-start/src/renderer/index.js: The decorators plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you want to use the legacy decorators semantics, you can set the 'legacy: true' option. (While processing: "base$2")
so i have to modify deco lib
const {
legacy = false
} = options;
if (typeof legacy !== "boolean") {
throw new Error("'legacy' must be a boolean.");
}
const {
decoratorsBeforeExport = false
} = options;
and no error
additional ,where can i set the babel.config.js in this repo
Thanks!
Same error here....
Found the solution in https://github.com/electron-userland/electron-webpack/issues/251#issuecomment-504693323