Skip to content
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

Multiple enhancements and fixes / Repair and speeding up Travis CI builds #168

Merged
merged 16 commits into from
May 5, 2019

Conversation

TemaSM
Copy link
Contributor

@TemaSM TemaSM commented Apr 25, 2019

  • Updated sweetalert2 from ^7.19.3 to ^8.10.0
  • Updated vue-router, vue-i18n, jquery, sass, eslint-plugin-import, eslint-plugin-node
  • Forced Laravel Dusk to use latest stable Chrome driver release (it was one of many reasons why Travis CI failing tests)
  • Enhanced Travis CI config - caching composer and npm, selfupdating composer, nodejs & npm to latest stable release during build, speeding up
  • Improved Laravel Dusk tests (fixed no such element: Unable to locate element and element not interactable)
  • Temporary disabled mix.extract(), because it's buggy with Webpack code-splitting/chunking mechanism (dynamic imports), see commit addf76d and related issue Extracted files path issue when using extract() and chunkFilename.. laravel-mix/laravel-mix#1889
  • Refactored routes file & fixed bugs of Laravel Mix 4 in webpack.mix.js file
  • Made HMR mode work great again, fixes HMR #163
  • Regenerated composer.lock for freshness

@TemaSM
Copy link
Contributor Author

TemaSM commented Apr 25, 2019

Travis CI failing because Laravel Dusk has old Chrome driver, according to laravel/dusk#641 issue.
So, there are incompatibility between chromedriver=2.45.615279 and Unpacking google-chrome-stable (74.0.3729.108-1) over (62.0.3202.94-1) as seen in Travis CI logs: Facebook\WebDriver\Exception\SessionNotCreatedException: session not created: Chrome version must be between 70 and 73

Using package https://github.com/staudenmeir/dusk-updater
See laravel/dusk#641
This commit will probably fix Travis CI failing, because Travis installs latest stable Chrome which not in sync with Chrome driver shipped with Laravel Dusk
@TemaSM
Copy link
Contributor Author

TemaSM commented Apr 26, 2019

According to Travis CI logs, eacf717 commit helped with Chrome and its driver to be in sync of versions to process Dusk tests

@TemaSM TemaSM changed the title Update deps (sweetalert2, vue-router, sass, eslint-plugin-import) Multiple enhancements and fixes / Repair and speeding up Travis CI builds Apr 26, 2019
@TemaSM
Copy link
Contributor Author

TemaSM commented Apr 26, 2019

Finished with this PR, so waiting for your review @cretueusebiu

@cretueusebiu
Copy link
Owner

Thanks for all the great work! Will merge it soon.

@TemaSM
Copy link
Contributor Author

TemaSM commented May 1, 2019

Great to hear.
There're some minor/patch updates available for npm & composer dependencies, so will update them in an hour, just for better freshness of laravel-vue-spa.

@cretueusebiu
Copy link
Owner

I see you added clean-webpack-plugin, do you know if there's a way to clear the files after the build process, because right now when you run npm run prod it will delete the files and then generate new ones. So if your app is in production, for a few seconds while it builds, the js/css files will be missing.

@TemaSM
Copy link
Contributor Author

TemaSM commented May 2, 2019

Yeah, probably that's not good behavior. Will try to improve the way of clean rebuilding frontend & its assets. ETA: 1 hour.

@TemaSM
Copy link
Contributor Author

TemaSM commented May 2, 2019

Found bug with Laravel Mix and Webpack chunks (in vue-router routes definition file).
Fixing may take more time than I expected.

@cretueusebiu
Copy link
Owner

It's really a bummer with Laravel Mix 4. There seems to be so many new bugs introduced... Should we wait a bit more for a new release of Mix or maybe go back to v2 ?

@TemaSM
Copy link
Contributor Author

TemaSM commented May 2, 2019

I think we can stand with v4 by applying few codehacks for building process (fixed few already) and release new laravel-vue-spa.
But will remove them, just after Laravel Mix developers fix bugs.
If my attempts to fix will unsuccessful, then downgrading to v2 will be the best option I think.

@TemaSM
Copy link
Contributor Author

TemaSM commented May 3, 2019

I made it working fine, but there's still bug with HMR mode.
Can push commit, so you may test everything except HMR, till I trying to fix it too.

@cretueusebiu
Copy link
Owner

Great! HMR didn't worked before too, so that's not a problem.

TemaSM added 4 commits May 4, 2019 19:41
* Routes file now has less copy-pasted ugly code, and got full support of Webpack code-splitting via dynamic imports and Vue.js async components (`vue-router` uses it under the hood)
* Temporary dropped support for `mix.version()` (in favor of `laravel-mix-versionhash`) due its buggy behavior while generating output Laravel Mix manifest
* Better assets versioning mechanism, including dynamically imported js modules
* Improved behavior of building process at production environment. Old assets removed only after compiled new ones, preventing 404 errors while Laravel Mix compiling these assets
* Made HMR mode work great again (but time to time it may do full page reload)
@TemaSM
Copy link
Contributor Author

TemaSM commented May 4, 2019

That's it, fixed all bugs of Laravel Mix, even HMR mode 😃
Waiting for your review @cretueusebiu

P.S> Probably, I have a better solution for fixing #153 than #155 PR.
Will try to do my best, but in different PR, right after we merge this one.

@cretueusebiu cretueusebiu merged commit a9ff415 into cretueusebiu:master May 5, 2019
@cretueusebiu
Copy link
Owner

Great job with this PR!

I've made some minor changes and will tag a new release soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HMR
2 participants