Rollup config to build custom js bundle from dist folder #33663
Unanswered
mouradkaroudi
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
According to Bootstrap 5 official documentation, we can import pre-compiled js files from
bootstrap/js/dist
and build a custom bundle using (Webpack, rollup, ...).And in the optimizing section in docs, they gave an example of how you can import js files.
https://getbootstrap.com/docs/5.0/customize/optimize/#lean-javascript
The problem: I created a file named bootstrap.js
import 'bootstrap/js/dist/tooltip';
and I want only to use the Tooltip plugin. I use the below configuration for rollup
After generating the
file.js
and use an HTML page an error shows up in the consolefile.js:1727 Uncaught ReferenceError: process is not defined
Beta Was this translation helpful? Give feedback.
All reactions