Skip to content

can't change output directory #5

Description

@WarrickFitz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions