When it comes to technologies like webpack, I must admit I'm quite new, but I am eager to learn.
Currently, I am working on a project in Visual Studio that utilizes Angular 4 + ASP.NET core and has webpack already set up. The project comes with Bootstrap by default, but I have a preference for using UIkit instead. UIkit has a JavaScript library which relies on the UIkit variable. You can find more information about this here.
Unfortunately, I have encountered an issue where webpack seems to be removing the global UIkit variable.
Within my project, there are two webpack files: webpack.config.js and webpack.config.vendor.js.
I attempted to expose the UIkit variable using expose-loader and provideplugin, but unfortunately, it did not yield the desired result. Interestingly, I was able to successfully expose jQuery by making modifications to my boot.browser.ts file and adding
import "expose-loader?$!jquery"; import "expose-loader?jQuery!jquery";
. However, when attempting to import UIkit, I received an error stating that Module '"uikit"' has no default export.
Any assistance would be greatly appreciated as I feel quite stuck at the moment due to my limited knowledge of TypeScript and webpack.