Hello,
This is probably my own ignorance, but I did not find a way to include a subpackage in my vendor bundle.
A created a small project demonstrating the issue.
The gist of the problem is that the locales of the package date-fns are in a subpackage.
I tried to include them like this:
fsbx.FuseBox.init({
homeDir: `./src`,
cache: false,
log: false
}).bundle({
[`dist/vendor.js`]: "+date-fns +date-fns/locale/fr"
})
But this does not work as I expected.
Could you suggest another way to accomplish this?
@geowarin thanks for reporting!
Yeah, it's a known "bug" you can't really add it like so. But this will be fixed.
You can make a workaround for now:
require("date-fns/locale/fr")
Ok. Yeah there is an easy workaround for those interested.
additionalVendors.js
require('date-fns/locale/fr');
fuse.js
vendor.bundle({
[`dist/vendor.js`]: "+date-fns additionalVendors.js"
})
Thanks there seems to be a problem with distinguishing what is a node module reference and what is a file. Gotta keep that issue in mind.
Thanks.
Coming with the next one
Most helpful comment
Coming with the next one