Open ZachGoldberg opened 2 years ago
Can you share your code?
You could add the explicit require('./fonts/fnt8-desc')
to your code so the expected file is included.
The files are included correctly by NCC, it's just the typing mismatch in the comparison of the arg
parameter. For now my fix is a hack sed command... sed -i 's|__ncc_wildcard$0(i|__ncc_wildcard$0(`${i}`|g' ncc/index.js
Oh I see what you mean 👍
The bug is likely webpack-asset-relocator-loader
here:
Feel free to submit a PR, thanks!
Including bwip-js in our project generates the following for bwip-js/node-fonts.js (https://github.com/metafloor/bwip-js/blob/v1.7.1/node-fonts.js#L44)
Note that we're passing an integer
i
into __ncc_wildcard$0 but the conditions inside that function is expecting strings"0"
"1"
"2"
. This causes the code to fail at runtime.