New changes in the typescript servicestack-client silently breaks builds done with webpack. It is silent in that webpack still outputs the bundle, but the resulting build leads to no javascript being run:
Webpack does emit a warning, however:
WARNING in ./node_modules/@servicestack/client/dist/index.js
24:51-58 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
@ ./node_modules/@servicestack/client/dist/index.js
@ ./src/shared/index.tsx
@ ./src/index.tsx
@ multi ./node_modules/react-scripts-ts/config/polyfills.js ./src/index.tsx
My guess is that the conditional require is the culprit:
Downgrading to version ā1.0.48ā seems to fix it (this version does not have the conditional require):
Steps to reproduce:
x new react-spa ProjectName
cd ProjectName/ProjectName
- Change the
@servicestack/client
dependency version to be^1.0.49
inpackage.json
npm install
- Run the project (the error occurs in dev mode as well as a prod build)