-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Laravel Mix is compatible with Webpack Cli #1716
Comments
laravel mix uses webpack-cli but that doesn't mean the user can. in comparison, you can use bud as a helper lib in a normal // webpack.config.js
import {factory} from '@roots/bud'
/**
* For info on configuring webpack with a function or promise:
* {@link https://webpack.js.org/configuration/configuration-types/#exporting-a-promise}
*/
export default async env => {
/**
* Instantiate bud
*/
const bud = await factory({mode: env.mode})
/**
* Set entrypoints and do other config as usual
*/
bud.entry('app', 'index.js').minimize().splitChunks()
/**
* This is our final config object. Return it for webpack.
*/
return await bud.build.make()
} it's not an insignificant difference. imagine you have a pre-existing application already set up for webpack-cli (maybe even some gulp scripts on the side). you aren't forced to retool everything and you aren't required to use the bud cli at all. it should be a much more manageable transition. approaching it from the opposite perspective: if you do have a import {get} from '@roots/bud'
export default async () => (await get()).build.make() |
@kellymears Gotcha. Thanks for the explanation. I believe we can also achieve the same by just installing webpack-cli (within the laravel mix project) and writing the same code within webpack.config.js |
Message to comment on stale issues. If none provided, will not mark issues stale |
Hi bud team,
I think you need to update the comparison graph, as I see laravel mix is compatible with webpack cli.
https://laravel-mix.com/docs/6.0/cli#pass-options-to-webpack-cli

The text was updated successfully, but these errors were encountered: