cra-craco-electron-example icon indicating copy to clipboard operation
cra-craco-electron-example copied to clipboard

can't change output directory

Open WarrickFitz opened this issue 5 years ago • 0 comments

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

WarrickFitz avatar Jul 17 '19 21:07 WarrickFitz