Wrong posture for webpack

I believe everyone is their own development of plug-ins, the source code, and then is NPM publish upload, over! But this pose is a little ugly!!

Then I thought about using WebPack to package the plugin, and the resulting bundle looks like this.

But don’t get too excited, because that’s what you’re going to quote… What the hell is this !!!! SuperClass = function / / ??????) {inherit () {inherit ()

Then I wondered if there was something wrong with the plugin, because normally in an HTML file, there is no exposed statement for referencing js files. There is no commonJS and no module syntax. You just need to define these variables and functions in the JS file, and then you can use them

Then I remove the exposed statement and pack it… It’s easy to understand what you’ve packaged, and it’s just a function that executes immediately. (The following is just an example, with the rest removed for faster packaging.)

So it still can’t be used. I am also confused now, and I don’t know which step went wrong. I want to know whether THERE is a mistake in my way of packaging. Is this error caused by incorrect configuration of processing using bable in the webpack.config.js file of the project or incorrect configuration during packaging? Brothers know the answer to me, attached below my package webpack.config.js file configuration