Skip to content

Commit

Permalink
Merge pull request #187 from BoostIO/production-env
Browse files Browse the repository at this point in the history
production env and routes
  • Loading branch information
ButteryCrumpet authored Dec 19, 2019
2 parents c380184 + 38c3fe0 commit e8edbf3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
22 changes: 12 additions & 10 deletions now.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,27 @@
},
"builds": [
{
"src": "package.json",
"use": "@now/static-build",
"config": {
"distDir": "compiled"
}
},
{
"src": "resources/*",
"src": "compiled/**/*",
"use": "@now/static"
}
],
"routes": [
{
"src": "/app/(.*.?bundle.js)",
"dest": "/compiled/$1"
},
{
"src": "/app/(.*).(js|icon|css|svg|png|gif|jpeg)$",
"dest": "/$1.$2"
"dest": "/compiled/app/$1.$2"
},
{
"src": "/app/?(.*)",
"dest": "/index.html"
"dest": "/compiled/index.html"
},
{
"src": "/",
"status": 301,
"headers": { "Location": "/app/" }
}
]
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"start": "electron app/index.js",
"lint": "eslint src/* --ext .ts,.tsx",
"format": "prettier --write \"src/**/*\"",
"build": "TS_NODE_PROJECT=\"tsconfig-webpack.json\" webpack --mode production",
"build:env": "rimraf compiled && env-cmd cross-env TS_NODE_PROJECT=\"tsconfig-webpack.json\" webpack --mode production",
"build": "rimraf compiled && env-cmd cross-env TS_NODE_PROJECT=\"tsconfig-webpack.json\" webpack --mode production",
"meta": "node scripts/meta.js",
"prepack": "rimraf dist && env-cmd npm run meta && electron-builder --dir",
"pack": "rimraf dist && env-cmd npm run meta && electron-builder",
Expand Down

0 comments on commit e8edbf3

Please sign in to comment.