Built on top of laravel-mix
.
yarn add webpack --dev "SwagDevOps/webpack-mixer#develop"
Sample webpack.mix.js
file:
const { Mixer } = require('@swagdevops/webpack-mixer')
const mixer = new Mixer()
const paths = mixer.paths
// Configuration ----------------------------------------------------
const copiables = [
[paths.source.join('images/favicon.png'), paths.public.join('favicon.ico')],
[paths.source.join('images'), paths.public.join('images')]
]
const cleanables = [
paths.public.join('css/app.css.map'),
paths.public.join('js/app.js.map')
]
// Execution --------------------------------------------------------
mixer.configure({
copiables: copiables,
cleanables: cleanables,
webpack: {
node: {
fs: 'empty'
}
}
}).run()
node_modules/webpack/bin/webpack.js \
--progress --hide-modules \
--config node_modules/@swagdevops/webpack-mixer/setup/webpack.config.js
node_modules/webpack/bin/webpack.js \
--progress --hide-modules \
--watch \
--config node_modules/@swagdevops/webpack-mixer/setup/webpack.config.js