call global function with input from Webpack 4 in html

38 views Asked by At

I want to add window name to top of webpack file like

"window["webpackTest"] =
/******/ (function(modules) "

then I want to call my init function with passing parameters in js file. I added some feature to webpack configuration file

globalObject: 'this',
library: 'myLib',
libraryTarget: 'var'

and I can see top of my webpack js file

var myLib = /******/
(function(modules) {

I wonder, how can I call my function in html file.

0

There are 0 answers