-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build Vendor JS Issue #138
Comments
Hi @goxmedia Thanks for the feedback. According to the Bootstrap Doc https://getbootstrap.com/docs/4.4/getting-started/download/ "The bootstrap module itself does not export anything. " So, I would recommend importing Bootstrap modules via vendor.js file and specify the path to modules that you are going to us or import already compiled bundle "'./node_modules/bootstrap/dist/js/bootstrap.js'" As for the error, we will check it. From my point of view, require should works but smth went wrong :) Thanks a lot |
Hi @sgurin Thanks for the reply. The issue we have when importing Bootstrap via the vendor.js file, vendor-compile.js does not "process" that import, i.e., babel() or terser(). We want to create a custom build of Bootstrap with only those components we intend to use and not the entire Boostrap library. Thanks in advance for your help. |
Hi @goxmedia You can import only modules that your are going to use. For example, if collapse is needed then util and collapse should be imported https://prnt.sc/ryw0nw All modules are separated into files and you can use already compiled files from dist folder or unminified from src folder https://prnt.sc/ryw1lj |
Hi @sgurin Thanks again for your reply. I understand. So what types of vendor js files would go into vendor-compile.js? |
Hi @goxmedia You can use any types of modules in the vendor-compile.js but do not forget to connect them inside your code correctly :) |
Hi @sgurin Thanks for your help. Really appreciate you guys making this code available to the community. |
Hi @goxmedia WSK version is updated and now ES6 imports could be used but I still would recommend using small chunks of plugins in case of the bootstrap. #140 |
Thank you. |
When importing Bootstrap into the build-js-vendor.js task via vendors-compile.js, the task fails due to THIS_IS_UNDEFINED error code.
We fixed this by adding the following to the onwarn block:
Here is our import via vendors-compile.js:
The text was updated successfully, but these errors were encountered: