Help Test the 1.0 Release
See original GitHub issueHey, everyone -
I’ve been working on Mix quite a bit in the last week, as we prep the official 1.0 release. Countless bugs have been fixed, and, for the non-webpack tasks, like concatenation, copying, and versioning, I’ve refactored the codebase to a more sequential task-based setup.
Because many sections of the codebase have been rewritten, I’d love some help testing the beta before we make it official.
Install
laravel new test-project
Currently, Laravel installs the 0.* version of Mix. Open package.json
and delete that line entirely. We’ll pull in the beta instead. Now return to the terminal and install Laravel’s Node dependencies, as well as the beta of Laravel Mix.
npm install
npm install laravel-mix@beta
Okay, you’re all set. Try out the API, see if you find any issues. I’m sure there are some, so we’ll get those squared away pretty quickly and then officially release 1.0 soon.
What to Test
- Windows users, please test out file watching (
npm run watch
). This can sometimes get a little tricky. - Sourcemaps work like you expect?
- All
mix.options()
settings good? - Production builds working well?
- …Anything you can think of would help.
Notes
-
The API should be exactly the same. This isn’t a breaking release.
-
File versioning (
mix.version()
) in Mix has changed. Rather than forcing a hash into the output file name, we instead store it as a querystring within yourmix-manifest.json
file. This not only simplifies the Mix codebase, but it should also make deployment and general compilation cleaner. -
Better terminal output for your compilation. This will now include even your non-webpack tasks.
-
If you create a .babelrc file in your project root, it’ll now be intelligently merged with Mix’s own Babel config file, rather than overwriting it completely. This was the source of many issues in the past.
-
Much of Mix’s internal structure has been simplified and refactored to a plugin-based system.
-
mix.combine/scripts/styles/minify()
andmix.copy()
are now triggered sequentially, after webpack finishes its main compilation. This means, you can sequentially do thinks like:- Compile my JS
- Then copy the generated output file to this other location
- And then concatenate that new file, with all these other files I have.
- And finally version all relevant files
mix.js('resources/assets/js/app.js', 'public/js')
.copy('public/js/app.js', 'public/somewhere')
.combine([
'public/js/vendor/jquery.js',
'public/somewhere/app.js'
], 'public/all.js')
.version();
Issue Analytics
- State:
- Created 6 years ago
- Reactions:24
- Comments:29 (9 by maintainers)
Top GitHub Comments
@TopFuel You saved my day! My issue was just because Windows treats slashes differently comparing to Linux/Mac OS. See my following working code:
I’m trying with an existing project and also from scratch.
node -v - v8.1.1
npm -v 5.0.3
When from scratch (using the instructions at the beginning of this issue)
I’m getting the following error when trying to run and of the npm commands
When I’m using with an existing project (non-laravel) I’m being able to run
npm run dev
andnpm run watch
, but every time that I try to runnpm run prod
I’m getting an error: