`Invalid left-hand side in assignment` when packing Hanlebar-helpers with ncc
rfennell opened this issue · 0 comments
Thank you for this project, I am successfully using it in a Typscript/Node project, loading it as follows
const handlebars = require('handlebars')
const helpers = require('handlebars-helpers')({
handlebars: handlebars
})
However I have found a problem if I try to package my project using @vercel/ncc
to produce as single index.js
. The command I am using the command
ncc build --source-map --license licenses.txt
The single index.js
is create and all the code up to loading the handlebar-helpers
module works, but the loading of the module causes the error
Invalid left-hand side in assignment
Note: this error only occurs if I package using ncc
, if I use the uncompressed files my projects works as expected.
On searching for this issue I can see it usually related to a old versions of referenced module in a module see this issue in the vercel/ncc repo.
I wonder if you hade seen this before, and if there was any potential solution?