Im creating an application that creates bunch of iframes, and loads part of the application inside them. Im trying to create a light "main.js" entry, that leaves the heavy parts of the application in different chunks. They way I though it should work, is that the "main.js" will create iframes, and then dynamically load the other chunks, to run them inside the iframe. Problem is, when the "main.js" dynamically import the chunks (the heavier parts of the application who should ran on the iframes), it rans them on the same window as he is (not the iframes one). How can I configure my webpack/implement my javascript, in order to allow the main.js be light, and only the iframe windows will load the "heavy" chunk parts?