It would nice if only specific entry/chunk can be wrapped. It allows parallel loading of pollyfils and main index.js.
EG.
entry: {
pollyfils: './src/pollyfils.js',
index: ['./src/index.js']
},
plugins: [
new EntryWrap('index', 'function run() {', '})')
]
HTML
<script src="pollyfils.js"></script>
<script src="index.js"></script>
<script>run()</script>