Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Latest commit

 

History

History

example

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Example

While this example is specifically targeting CRA users due to the added complexity, there is useful information here regardless of your setup.

How to get @elm-react/component working with Create React App?

First, install @rescripts/cli, @elm-react/rescripts-elm, elm and elm-webpack-loader as dev dependencies:

npm i -D @rescripts/cli @elm-react/rescripts-elm elm elm-webpack-loader

Or using yarn: yarn add -D @rescripts/cli @elm-react/rescripts-elm elm elm-webpack-loader

update your package.json:

  "scripts": {
-   "start": "react-scripts start",
+   "start": "rescripts start",
-   "build": "react-scripts build",
+   "build": "rescripts build",
-   "test": "react-scripts test",
+   "test": "rescripts test",
-   "eject": "react-scripts eject"
  },
  .
  .
  .
+ "rescripts": [
+   "@elm-react/rescripts-elm"
+ ]

From here you should be able to follow the guide for this library! Enjoy using Elm! And be sure to check out the Elm guide if you're new!