bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Bootstrap 5.2 compiled js Codekit not the same as bootstrap.bundle.js

Open Allmedialab opened this issue 3 years ago • 0 comments

Prerequisites

Describe the issue

Hi,

I have a Bootstrap 5.2 project in Codekit latest version and Codekit compiles the Bootstrap js like this in main.js:

import 'bootstrap/js/dist/alert'; import 'bootstrap/js/dist/button'; import 'bootstrap/js/dist/carousel'; import 'bootstrap/js/dist/collapse'; import 'bootstrap/js/dist/dropdown'; import 'bootstrap/js/dist/modal'; import 'bootstrap/js/dist/offcanvas'; import 'bootstrap/js/dist/popover'; import 'bootstrap/js/dist/scrollspy'; import 'bootstrap/js/dist/tab'; import 'bootstrap/js/dist/toast'; import 'bootstrap/js/dist/tooltip'; import '@popperjs/core/lib/index.js'

This gives me the following error in the console:

theme.min.js:1 Uncaught ReferenceError: bootstrap is not defined

at theme.min.js:1:5938

at Array.map ()

at theme.min.js:1:5921

at theme.min.js:1:11309

Now when I replace the Codekit main.js with bootstrap.bundle.js from the node_modules the error is gone!

My question is what is the difference between the above showed compiled Bootstrap 5 modules in Codekit (what is missing?) and bootstrap.bundle.js that works perfect.

Thanks,

David

Reduced test cases

Compare complied js with bootstrap.bundle.js

What operating system(s) are you seeing the problem on?

macOS

What browser(s) are you seeing the problem on?

Chrome

What version of Bootstrap are you using?

5.2

Allmedialab avatar Aug 08 '22 11:08 Allmedialab