scancode-workbench icon indicating copy to clipboard operation
scancode-workbench copied to clipboard

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

Open OmkarPh opened this issue 3 years ago • 2 comments

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 avatar Jul 26 '22 06:07 OmkarPh

@steven-esser ^^

OmkarPh avatar Jul 28 '22 15:07 OmkarPh

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)

OmkarPh avatar Aug 18 '22 17:08 OmkarPh