$ yarn install
$ npm start
Visit http://localhost:3000/
from your browser of choice.
Server is visible from the local network as well.
It is using webpack dashboard, so please note the following:
OS X Terminal.app users: Make sure that View → Allow Mouse Reporting is enabled, otherwise scrolling through logs and modules won't work. If your version of Terminal.app doesn't have this feature, you may want to check out an alternative such as iTerm2.
Build will be placed in the build
folder.
$ npm run build
If your app is not running on the server root you should change publicPath
at two places.
In webpack.config.js
(ATM line 147):
output: {
path: buildPath,
publicPath: '/your-app/',
filename: 'app-[hash].js',
},
and in src/routes
(ATM line 9):
const publicPath = '/your-app/';
Don't forget the trailing slash (/
). In development visit http://localhost:3000/your-app/
.
This command will start webpack dev server, but with NODE_ENV
set to production
.
Everything will be minified and served.
Hot reload will not work, so you need to refresh the page manually after changing the code.
npm run preview
$ npm run lint
docker build --no-cache -t device-sim-front .
docker run -p 80:9000 device-sim-front