Here is my webpack.config.js
module.exports = {
entry: \"./src/index.js\",//path relative to this file
output: {
filename: \"../frontEnd/bundle.
You aren't exporting test() to window.
module.exports = {...} won't automagically get injected into window, but:
output.libraryTarget: 'window' and output.library: 'something' configuration options and get window.something.test() (docs here), orwindow.test = test; at the end of your Webpack entry point instead of exporting things.