Hello, I just purchased metronic 8 and built it with webpack and in the assets folder here: demo1\dist\assets\css\style.bundle.js there is this file called style.bundle.js which is being generated by webpack. Can you please let me know what is the purpose of this file and why it is being generated?
By default, webpack will generate that .js file. As in your configuration output, all the entry files must generate their js files.
Note: extract-text-webpack-plugin will extract all css/sass located in your js entry files.
It moves all the required *.css modules in entry chunks into a separate CSS file. So your styles are no longer inlined into the JS bundle, but in a separate CSS file (styles.css).
styles.js will not be used. You can remove it.
Not sure if I understand you, if this file will not be used/has no purpose or will not be linked from any html document then why it is being generated? There must be a reason!
What do you mean exactly by: "You can remove it"? if I do so and then run a new webpack build it is going to be regenerated anyways!
Webpack generated it by default. We cannot control it. We can add a function to delete it after being generated, it will be automatically removed after the webpack run.