Closed Cristialt closed 1 year ago
If you would use Vite, a superior packer IMO, there wouldn't be any issue. However, you could also pack a custom BSN:
Create an index.[ts|js]
file in your App, copy/paste and/or customize to your needs:
import {
Alert, Button, // all components you want
initCallback, removeDataAPI // all other stuff you need
} from 'bootstrap.native';
// OPTIONAL: Bulk initialize all components
if (document.body) initCallback();
else {
document.addEventListener('DOMContentLoaded', initCallback, { once: true });
}
export default {
Alert, Button,
initCallback, removeDataAPI
}
Let me know how it goes.
Thanks @thednp, following your suggestion everything worked well this time
just had to import { comps } from 'bootstrap.native/dist/bootstrap-native'
I'm using BSN in a big project
Webpack 5 BSN 4.2
getting
this could be easily fixed if changing node_modules/bootstrap.native/src/version.js
from
to
but obviously this is not a solution, so i'm wondering if there any config that could resolve this or should we just go ahead and create a merge request with this ^ fix?
thanks in advance!