Example project for using ng-packagr with NativeScript.
Add to your webpack.config.js
:
config.plugins.push(new webpack.NormalModuleReplacementPlugin(/^ws$/, "nativescript-websockets"));
run ans any normal nativescript application. everything in the app/lib folder is to be shared and dist.
npm run build
cd dist/mylib/
npm publish