cra-craco-electron-example
cra-craco-electron-example copied to clipboard
can't change output directory
It seem like you're unable to change the webpack output directory:
With craco.config.electron.js
var path = require('path');
// const logWebpackConfigPlugin = require("./craco-plugin-log-webpack-config");
// { plugin: logWebpackConfigPlugin, options: { preText: "Will log the webpack config:" } }
module.exports = {
plugins: [
],
webpack: {
mode: "extends",
configure: {
target: 'electron-renderer',
externals: {
"node-hid": 'commonjs node-hid'
},
output: {
filename: 'bundle.js',
path: path.join(__dirname, '/app/build'),
},
}
}
};
I run
yarn build:electron
and I always get this error
ENOENT: no such file or directory, open 'D:\XXX\myprojectroot\build\bundle.js'
Something seems to have \build\ hard coded