MainContainer module parse failed - currently no loaders are configured
Hi folks,
We are looking to use clarity-react in a simple typescript create-react-app project. We have followed the instructions in the README (including getting the clarity-react node module from Github instead of npm - issue #72 ), however are getting the following error:
./node_modules/@dell/clarity-react/src/layout/main-container/MainContainer.tsx 24:7
Module parse failed: Unexpected token (24:7)
You may need an appropriate loader to handle this file type, currently no loaders
are configured to process this file.
See https://webpack.js.org/concepts#loaders
| * @param {dataqa} for Quality Engineering
| */
> export type MainContainerProps = {
| actions?: React.ReactNode;
| title: string;
We weren't expecting to configure a loader for something in our node modules, is there something we are missing?
Note: Our App.tsx and index.tsx are copied from the README.md example and the rest is a vanilla create-react-app project to test this out
Thanks in advance!
cc @gmrodgers
Hi j-lea,
You will be able to load components from dist after executing make in folder node_modules/@dell/clarity-react.
e.g.
import {MainContainer} from "@dell/clarity-react/dist/layout/main-container/MainContainer"
I got the idea from https://github.com/EMCECS/clarity-react/issues/82