alexh's avatar
Level 5

Laravel mix + vue dynamic async components

Following up the discussion on the laravel mix github repo:

https://github.com/JeffreyWay/laravel-mix/issues/2088

To quote JeffreyWay: "Dynamic imports aren't supported in Mix 4. We can't solve that until webpack 5 is out, which hopefully is soon."

But then I saw the article from laravel-news on how to use dynamic imports on laravel mix: https://laravel-news.com/using-dynamic-imports-with-laravel-mix

Has anyone experiences on using dynamic async components in laravel?

I am currently trying to use dynamic async vue components on my laravel application. I have been using laravel mix together with tailwindcss and SASS. If I try to implement the async components as described in the article from laravel news I get the following error in npm run dev:

16% building 57/58 modules 1 active ...cuments/projects/project/node_modules/sass-loader/dist/cjs.js??ref--5-4!/project/resources/assets/sass/app.scssBrowserslist: caniuse-lite is outdated. Please run next command npm update 92% additional asset processing unnamed compat plugin/project/node_modules/css/lib/parse/index.js:72 throw err; ^

Error: undefined:11:5: property missing ':'

Let me know if you would like to see the whole stacktrace.

0 likes
0 replies

Please or to participate in this conversation.