My react app (that I think is based of create-react-app - I didn't create it initially)
Doesn't use an index.html, it has an index.js, well it has a few index.js,
I want to know how this works? Basically when I run npm run build, a build folder isnt created, an es and a lib folder are created which are copies of the src folder (which contains the components)
Why are these two folders created and not a build?
I used an npm package: https://www.npmjs.com/package/react-chat-window
Here is my package.json (might hold the clues):
I really want to understand because on my server, I am using nginx, but it isnt routed to any of the files, the sites-available/default doesnt route to anywhere its the default settings so how does it work!?
{
"name": "react-chat-window",
"version": "1.0.8",
"description": "react-live-chat React component",
"main": "lib/index.js",
"module": "es/index.js",
"files": [
"css",
"es",
"lib",
"umd"
],
"scripts": {
"build": "nwb build-react-component --copy-files",
"clean": "nwb clean-module && nwb clean-demo",
"start": " nwb serve-react-demo",
"gh:publish": "nwb build-demo && gh-pages -d demo/dist"
},
"dependencies": {
"@material-ui/core": "^3.2.0",
"emoji-js": "3.2.2",
"fs": "0.0.1-security",
"gh-pages": "^1.0.0",
"material-ui": "^0.20.2",
"moment": "^2.24.0",
"prop-types": "15.5.10",
"react-highlight.js": "1.0.5",
"react-slick": "^0.23.2",
"slick-carousel": "^1.8.1",
"socket.io-client": "2.0.3"
},
"peerDependencies": {
"react": "16.6.0",
"react-dom": "^16.6.0"
},
"devDependencies": {
"nwb": "0.17.x",
"react": "^16.6.0",
"react-dom": "^16.6.0"
},
"author": "",
"homepage": "",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/kingofthestack/react-live-chat.git"
},
"keywords": [
"react-component"
]
}