How to use relative file module with Create React app

Issue #751

Declare data/package.json to make it into node module

1
2
3
4
5
6
7
{
"name": "data",
"version": "0.1.0",
"private": true,
"homepage": ".",
"main": "main.js"
}

Then in landing/package.json, use file

1
2
3
4
5
6
7
8
9
10
11
12
13
{
"name": "landing",
"version": "0.1.0",
"private": true,
"homepage": ".",
"dependencies": {
"@emotion/core": "^10.0.28",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-image": "^2.4.0",
"react-scripts": "3.4.1",
"data": "file:../data"
},

Comments