serverless-bundle
serverless-bundle copied to clipboard
Webpack error for node compiled libraries - support for node-loader
We are trying to add a new library (node-cld) to our project, but we are not able to package it as Webpack fails:
ERROR in ../../cld/build/Release/cld.node 1:0 Module parse failed: Unexpected character '�' (1:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders (Source code omitted for this binary file) @ ../../cld/index.js 2:13-48
The library requires a .node
module which is not supported by the default webpack configuration that is provided.
Is it possible to add the node-loader
to the list of supported loaders?
Thank you.
I needed the same for the node-canvas module, ended up building a lambda layer with that library as suggested in #43.
It would be great to have this built-in though