Skip to content

Using 'pg' in webpack to Electron return an error trying to requiring pg-native. #1138

@michaeljota

Description

@michaeljota

Hi!

I'm trying to use this bundled with webpack to be used in electron. But it tries to import the pg-native module. I really don't know how to use the native binding in Electron, but at least I would like to be able to use the plain JS driver.

I read #127 and #838, and commenting the lines mentioned here makes the package works, but I see this most like a workarround. The problem it's not gone, just hided.

Thanks!

EDIT: You can test this here

npm run build:electron

Main and Renderer process will be packaged in separated files. The Renderer part will be packaged correctly, but when it tries to bundle the Main part the error will be thrown.

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