Skip to content

Commit

Permalink
feat(DEV-17): make page refreshes work on local, local:prod and verce…
Browse files Browse the repository at this point in the history
…l deployments
  • Loading branch information
hhimanshu committed Jul 2, 2021
1 parent 2798037 commit c972032
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -7,7 +7,7 @@
"test": "jest --config jest.config.ts",
"test:watch": "jest --watchAll --config jest.config.ts --collectCoverage=false",
"start": "webpack serve --config webpack.dev.js ",
"start-prod": "rm -rf dist && yarn build && npx -y serve dist",
"start-prod": "rm -rf dist && yarn build && npx -y serve -s dist",
"build": "webpack --config webpack.prod.js",
"lint": "eslint -c .eslintrc.js --ext .ts src",
"format": "prettier --write .",
Expand Down
8 changes: 8 additions & 0 deletions vercel.json
@@ -0,0 +1,8 @@
{
"rewrites": [
{
"source": "/(.*)",
"destination": "/"
}
]
}
1 change: 1 addition & 0 deletions webpack.dev.js
Expand Up @@ -10,6 +10,7 @@ module.exports = merge(common, {
devtool: 'inline-source-map',
devServer: {
contentBase: './dist',
historyApiFallback: true,
hot: true,
onListening: () => {
openBrowser(`http://${host}:${port}`);
Expand Down

0 comments on commit c972032

Please sign in to comment.