react-app-rewire-yaml
Add yaml-loader together with yaml-lint-loader and json-loader to your create-react-app via react-app-rewired.
Installation
yarn add --dev react-app-rewire-yaml
OR
npm install --save-dev react-app-rewire-yaml
Usage
In your react-app-rewired configuration:
/* config-overrides.js */ const rewireYAML = ; module { // ... config = ; // ... return config;}
In your React application:
import data from './data.yaml' const App = <div> datakey </div>;