Hi Somasundaram, here goes my code :
webpack.config.js
module.exports = {
entry: "./index.js",
output: {
path: 'dist',
filename: "bundle.js"
},
resolve: {
extensions: ['', '.js']
},
target: "web",
plugins: [ ]
};
index.js
define('index', ['underscore'], function (_) {
window.myName = "Clark Kent";
console.log(_.contains([1, 2, 3], 3);); /* -- TRUE --*/
console.log(window.myName);
});
Error in Terminal :
window.myName = "Clark Kent";
ReferenceError: window is not defined
Apologies for the poor formatting.