laravel-mix
Laravel Mix
laravel-mix | Laravel Mix | |
---|---|---|
1 | 13 | |
4,906 | 5,238 | |
- | 0.1% | |
8.7 | 1.2 | |
over 2 years ago | 4 months ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
laravel-mix
-
Need help using Laravel Mix 6
const path = require('path') const fs = require('fs-extra') const mix = require('laravel-mix') require('laravel-mix-versionhash') const tailwindcss = require('tailwindcss') // const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') mix .js('resources/js/app.js', 'public/dist/js').vue() .sass('resources/sass/app.scss', 'public/dist/css') .options({ processCssUrls: false, postCss: [tailwindcss('./tailwind.config.js')] }) .disableNotifications() if (mix.inProduction()) { mix // .extract() // Disabled until resolved: https://github.com/JeffreyWay/laravel-mix/issues/1889 // .version() // Use `laravel-mix-versionhash` for the generating correct Laravel Mix manifest file. .versionHash() } else { mix.sourceMaps() } mix.webpackConfig({ plugins: [ // new BundleAnalyzerPlugin() ], resolve: { extensions: ['.js', '.json', '.vue'], alias: { '~': path.join(__dirname, './resources/js') } }, output: { chunkFilename: 'dist/js/[chunkhash].js', path: path.resolve(__dirname, mix.inProduction() ? './public/build' : './public') } }) mix.then(() => { if (mix.inProduction()) { process.nextTick(() => publishAseets()) } }) function publishAseets () { const publicDir = path.resolve(__dirname, './public') fs.removeSync(path.join(publicDir, 'dist')) fs.copySync(path.join(publicDir, 'build', 'dist'), path.join(publicDir, 'dist')) fs.removeSync(path.join(publicDir, 'build')) }
Laravel Mix
-
concerned about long term stability of laravel
Yeah, I'm the guy who tells you: No one is forcing you to switch to Vite. Laravel Mix still works and will work for the forseeable future. Mix isn't even part of the Laravel GitHub organisation and noone from the core Laravel team has contributed to the package in the last few months.
-
Laravel Mix throws weird error "Error: spawn Unknown system error -86 at ChildProcess.spawn (node:internal/child_process:412:11)"
"It is fixed." https://github.com/mikaelbr/node-notifier/issues/361 via https://github.com/laravel-mix/laravel-mix/issues/2937 via https://github.com/josephdyer/skeleventy/issues/32
-
Negative effects when compiling on M1 Macbook
A quick Google search led me to here. Which suggested that I add the following to my webpack.mix.js file:
- 10+ Best Laravel Dev Tools For Faster Development🚀 2021
- 10+ Best Laravel Dev Tools For Faster Development🚀2021
-
How target node with laravel-mix?
I've found a workaround and raised an issue (https://github.com/JeffreyWay/laravel-mix/issues/3045)
-
How to Use CMake Without the Agonizing Pain - Part 2
Oh, have I got the thing for you. You can just use laravel-mix for the common usecases:
-
I just don't get webpack, it's miserable, what should I do?
Try laravel-mix, makes it a lot easier.
-
State of the NuGet ecosystem
Let's not forget the time webpack did this but only on Mondays to cut down on spam, causing builds to fail on Mondays
-
Laravel Breaking Continuously on Install.
https://github.com/JeffreyWay/laravel-mix/issues/2550#issuecomment-752735914
What are some alternatives?
laraberg - A Gutenberg implementation for Laravel
vite - Next generation frontend tooling. It's fast!
react-loadable - :hourglass_flowing_sand: A higher order component for loading components with promises.
Symfony Encore - A simple but powerful API for processing & compiling assets built around Webpack
webpack - A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
Symfony Asset - Manages URL generation and versioning of web assets such as CSS stylesheets, JavaScript files and image files
graphql-laravel-example - A comprehensive example project to show how to use graphql + laravel in the real world!
jetstream - Tailwind scaffolding for the Laravel framework.
PHP Debug Bar - Debug bar for PHP
WordPress Packagist - WordPress Packagist — manage your plugins with Composer
multi-tenant - Run multiple websites using the same Laravel installation while keeping tenant specific data separated for fully independent multi-domain setups, previously github.com/hyn/multi-tenant