Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.
This repository was archived by the owner on Jun 5, 2019. It is now read-only.

HMR tries to connect & React errors in production build #123

@nolawnchairs

Description

@nolawnchairs

Hi,

When opening the dev console in the production build:
Connecting to fusebox HMR at ws://localhost:7992

This subsequently refuses to connect, and keeps trying again ad infinitum, filling up the developer console.

I also get all the Recat errors and warnings in the console.

Within the main process (using electron-is-dev) returns the correct boolean value.

The only change I've made to thefuse.ts file are:

const isProduction = !!(process.env.NODE_ENV === 'production'); // sometimes was 'undefined'
...
const rendererBundle = fuse
    .bundle('renderer')
    .instructions('> [renderer/index.tsx] +fuse-box-css')
    .plugin(CSSPlugin())
    .plugin(CopyPlugin({ useDefault: false, files: ASSETS, dest: 'assets', resolve: 'assets/' }))
    .plugin(EnvPlugin({ NODE_ENV: isProduction ? "production" : "development" }));

I normally use Webpack, not Fuse, so I'm not as familiar with how things are done in fuse. Any ideas on why this is happening?

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