React starter kit using React 16.
- Webpack (https://webpack.js.org/)
- React (https://facebook.github.io/react/)
- Tests for Modal component
yarn
yarn start
Go to http://localhost:8080/
and try it out.
Contains only one component test for now, just an example how testing works.
yarn test
Build a production ready version
yarn build
When the build is ready you can find the files in the dist/ folder.
You can set the environment variables in the files development.js
and production.js
located in the env directory. When you change the env file you need to run yarn start
again. The env files need to export an object contain. This object can contain overrides for webpack en environment variables used in the app. When you want to use the env variables in your application you can get them by using process.env
.
// development.js
module.exports = {
webpack: {
output: {
publicPath: 'http://localhost:8080/',
},
},
app: {
apiUrl: 'http://localhost:8000/api/',
},
};
It's also possible to load a different environment config (e.g. mock.js
). Create the file in the env directory and run the application again with an extra ENV setting that has the same name.
ENV=mock yarn start