I am trying to import component using import(). It is giving me error.
I am using react-loadable I tried with react-import package as well but no luck
I tried with below code:
import React, { Component } from 'react';
import { HashRouter, Route, Switch } from 'react-router-dom';
import Loadable from 'react-loadable';
import './App.scss';
const loading = () => <div className="animated fadeIn pt-3 text-center">Loading...</div>;
// Containers
const DefaultLayout = Loadable({
loader: () => import('./containers/DefaultLayout'),
loading
});
Module build failed: SyntaxError: ...../resources/assets/js/src/App.js: Unexpected token, expected { (5:7)
Any help would be appreciated

require()instead ofimport().require()does work but now other react syntax is having an issue likeconst loading = () => ..is not valid syntax. @AbhishekKumawat I will chek other alternatives.