I made a nodejs shared library and now I want to package it in order to deploy it. I would like being able to use it with angular 2 application packaged thanks to webpack.
the shared lib is located in a folder build/Release.
how to proceed to package it nicely in webpack ? or is it a particular package.json declaration ?
having a look at nodejs documentation, dll names are using extension .node (https://nodejs.org/api/addons.html#addons_loading_addons_using_require)
webpack node-loader may help ? https://webpack.js.org/loaders/node-loader/
I will use server side rendering , otherwise that won't be possible.
Regards, Steph
using node-loader or node-native-loader, it does not want to load the node module . in webpack.config.js , I have added next rules :
"rules": [
{
"test": /\.node$/,
"loader": "node-native-loader?from=app"
},
results in : Cannot find module './control.node'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With