Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix native modules issue in Release builds for React+TS version #531

Closed
OmkarPh opened this issue Jul 26, 2022 · 2 comments · Fixed by #623
Closed

Fix native modules issue in Release builds for React+TS version #531

OmkarPh opened this issue Jul 26, 2022 · 2 comments · Fixed by #623
Labels
version4 Issue for v4

Comments

@OmkarPh
Copy link
Collaborator

OmkarPh commented Jul 26, 2022

Dev mode - Everything works as expected end to end
Release build -

  • Build process works without error:
    Build steps:
    • Install dependencies: npm install
    • Run package script: npm run package
    • App is generated in out/ in the format supported by platform it is built on

image

  • Running the generated app works fine:
    image

  • Err occurs, after selecting a JSON file for import, i.e. when sqlite3 is being required by Sequelize.
    Essentially, sqlite3 isn't being made available in the release build, since it is a native module, it needs some particular config changes in webpack so that it can be available in the release build too.
    image

@OmkarPh
Copy link
Collaborator Author

OmkarPh commented Jul 28, 2022

@steven-esser ^^

@OmkarPh
Copy link
Collaborator Author

OmkarPh commented Aug 18, 2022

Update: Current code in branch v4.0-react-typescript builds fine, but has larger bundle size due to raw node_modules being added into the package(this must be prevented to reduce package size)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version4 Issue for v4
Projects
None yet
2 participants