I have several entries in my webpack configuration:
entry: { 'polyfills': './src/polyfills.ts', 'vendor': './src/vendor.ts', 'app': './src/main.ts' },
When I run npm start ( webpack-dev-server --inline --progress --port 8080 --bail ), \<my-app>Loading...</my-app> in my index.html turns into scripts in the following order:
<script type="text/javascript" src="http://localhost:8080/common.js"> </script><script type="text/javascript" src="http://localhost:8080/vendor.js"></script> <script type="text/javascript" src="http://localhost:8080/polyfills.js"></script> <script type="text/javascript" src="http://localhost:8080/app.js"></script>
But when I ran webpack -p --progress --profile --bail in the following order:
general, application, polyfil, then supplier
Order is important. My app.js code will not work if executed before polyfil.js or vendor.js. How to manage the order?
source share