Splitchunk lazyload from index.ts not working
nguyenbatranvan opened this issue · comments
Van Nguyen commented
i have files
- src/components/chart/chart-1.tsx
- src/components/chart/chart-2.tsx
and i export from src/components/chart/index.ts
-
export {Chart1} from "./chart-1"
-
export {Chart2} from "./chart-2"
and then, i import in app.tsx
import {Chart1} from "./components/chart"
working well. But i using lazy load react
const Chart1 = lazy(() => import("./components/chart").then(m => ({default: m.Chart1})))
have a error
Uncaught SyntaxError: Unexpected token ';' const Chart1 = lazy(_c = () => ;then((m) => ({ default: m.Chart1 })));
What do I need to do with this?