Webpack with Laravel Mix
About Laravel Mix
The webpack NPM package is a build tool for the front-end assets of your theme. It is also an automation tool to help you manage your development workflow. TypeRocket 4.0 uses webpack to do just that.
Laravel Mix takes advantage of webpack and makes the development process that much better. You can learn more about everything you can do with webpack on Mix's documentation page.
To get started you need to first download the NPM packages required to use mix in the root of your TypeRocket folder.
The best place to get started is on the Mix's documentation page. In TypeRocket your main webpack file
webpack.mix.js is in the root TypeRocket directory.
You are in the development process run
npm run watch to watch for file changes and update your assets on the fly.
npm run watch
When your code is ready for production run
npm run prod to minify and compress your assets.
npm run prod