0

I want to implement asyncComponent in laravel + react. Everything work Good before i tried asyncComponent.

When i try that return error :

Code :

import asyncComponent from '../component/asyncComponent';

const Home = asyncComponent(() => import('../pages/home') //line 9
  .then(module => module.default), { name: 'Home' });

Error:

Module build failed: SyntaxError: E:/xampp/htdocs/react/lara-react/blog-new/resources/js/back-end/layout/main.js: Unexpected token (9:34)

How to implement asyncComponent in laravel ?

Dhruv Raval
  • 1,535
  • 1
  • 8
  • 15

0 Answers0