Skip to content

Has fable 3/elmish/react been made to work with webpack 5 or vitejs yet? Nagareyama build documentation #10

@tomcl

Description

@tomcl

Fable 3

I'm thinking of changing my boilerplate for current fable 3/elmish/hmr/webpack 4/electron (using electron-webpack) to webpack 5. electron-webpack - currently used - does not work (and will not work) with later versions of electron so I will start with a well maintained electron-react-webpack 5 boilerplate https://github.com/alexdevero/electron-react-webpack-boilerplate/blob/master/package.json or https://github.com/electron-react-boilerplate/electron-react-boilerplate/blob/main/package.json (one of these is minimal - I could build up as needed, the other enormous) and then getting this to work with Fable/Elmish.

AFAIK Fable 3's main interaction with Webpack is the output js files which are all picked up from the top-level entry and should be trouble-free. I see more trouble getting HMR to work with Elmish but with any luck HMR working with React in an existing boilerplate would be a good start? So I'm wondering - what else will I need to consider (source maps are always an issue)?

Is this going to be a big mess? Who has working fable 3 / elmish/ webpack 5 boilerplate? I am also half-thinking I should try to use vite as bundler with vite/electron/react starting point https://github.com/twstyled/electron-vite-react but that looks riskier to me. It would be really helpful to have a complete description of fable 3 output - since I'm hoping this is pretty simple now?

On this topic - every time I try to debug fable 3 source maps (which work intermittently on my current electron build) my documentation for how to do this is a tangled set of googled posts. It might help to put this on the documentation somewhere? Unless this has been done and I'm missing something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions