Closed mtrunkat closed 5 years ago
Sorry, not an NPM user myself, or I would have caught this sooner.
That require is actually part of bootbox.locales.js, which is combined with bootbox.js to create a single file with all locales. Probably not the right way to generate a file with all locales. I'll see if I can come up with a better grunt task. If you only need the en locale (the default), are you able to tell Webpack to use bootbox.min.js instead, in the meanwhile?
The original idea was to pull in all the individual files from the locales directory. Having a distinct file for each locale should, in theory, make it easier to create new locales, since you're only editing one locale at a time.
What about to just point main
property of package.json file to src/bootbox.js
instead of dist/...
?
I can do that, I suppose. The thought was that pointing to the bootbox.all file was the least breaking change, since Bootbox 4 included all the locales in the single source file. In Bootbox 5, I only left the en locale in bootbox.js, since that's the default locale.
I changed the bootbox.all.min.js file to be built from a new source file, bootbox.all.js, which uses the 4.x version of defining locales (one large array). Just pushed this to npm - if you can let me know if that works, I'd appreciate it.
We have just tried to update from version 4.x to 5.x. After update following error appear in Chrome console:
Tested on OS X + Node.js v8.12.0 with Meteor.js framework which bundles frontend build using Webpack.
After looking into code of the package I think that the problem is in
./dist/bootbox.all.min.js
which requires a./bootbox.js
viarequire('./bootbox')
but this file is not contained in./dist/
directory.