scancode-workbench
scancode-workbench copied to clipboard
Fix native modules issue in Release builds for React+TS version
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
- Install dependencies:

-
Running the generated app works fine:

-
Err occurs, after selecting a JSON file for import, i.e. when sqlite3 is being
requiredby 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.
@steven-esser ^^
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)