refactor: Remove babel/register for instant production server startup (#1481)

* refactor: Remove babel/register for instant production server startup

* fix: Update procfile location

* fix: package.json must be copied, not linked for production build

* fix: Production file paths

* fix: Public assets path

* Remove unused scripts
This commit is contained in:
Tom Moor
2020-09-13 10:46:33 -07:00
committed by GitHub
parent 450d6b7e42
commit 608be3deef
14 changed files with 305 additions and 289 deletions

View File

@@ -1,14 +1,15 @@
{
"name": "outline",
"private": true,
"license": "Business Source License 1.1",
"main": "index.js",
"scripts": {
"clean": "rimraf dist",
"build:webpack": "NODE_ENV=production webpack --config webpack.config.prod.js",
"build:analyze": "NODE_ENV=production webpack --config webpack.config.prod.js --json > stats.json",
"build": "yarn clean && yarn build:webpack",
"start": "NODE_ENV=production node index.js",
"dev": "NODE_ENV=development nodemon --watch server index.js",
"clean": "rimraf build",
"build:server": "babel -d ./build/server ./server && babel -d ./build/shared ./shared && cp package.json ./build && ln -sf \"$(pwd)/webpack.config.dev.js\" ./build",
"build:webpack": "webpack --config webpack.config.prod.js",
"build": "yarn clean && yarn build:webpack && yarn build:server",
"start": "node ./build/server/index.js",
"dev": "nodemon --exec \"yarn build:server && node build/server/index.js\" -e js --ignore build/",
"lint": "eslint app server shared",
"flow": "flow",
"deploy": "git push heroku master",
@@ -64,7 +65,6 @@
"@babel/preset-env": "^7.11.0",
"@babel/preset-flow": "^7.10.4",
"@babel/preset-react": "^7.10.4",
"@babel/register": "^7.10.5",
"@rehooks/window-scroll-position": "^1.0.1",
"@sentry/node": "^5.23.0",
"@tippy.js/react": "^2.2.2",
@@ -160,6 +160,7 @@
"validator": "5.2.0"
},
"devDependencies": {
"@babel/cli": "^7.10.5",
"@relative-ci/agent": "^1.3.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.2.2",