зеркало из https://github.com/mozilla/pontoon.git
Fix bug 1473330 - Build frontend resources during Heroku deploy. (#1018)
* Fix bug 1473330 - Build frontend resources during Heroku deploy. * Use correct URL to request data from the server. * Load actual fontawesome CSS file.
This commit is contained in:
Родитель
43becde477
Коммит
a72a26fb82
|
@ -9,10 +9,14 @@ fi
|
|||
# Compile static assets
|
||||
export PATH=/app/.heroku/node/bin:$PATH
|
||||
npm install .
|
||||
pushd frontend && npm install && popd
|
||||
|
||||
echo "Running webpack..."
|
||||
./node_modules/.bin/webpack -p
|
||||
|
||||
echo "Building frontend resources..."
|
||||
pushd frontend && npm run build && popd
|
||||
|
||||
echo "Collecting static files..."
|
||||
./manage.py migrate --noinput
|
||||
./manage.py collectstatic --noinput
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
background: #333941;
|
||||
}
|
||||
</style>
|
||||
<link href="/static/css/font-awesome.css" rel="stylesheet" type="text/css" />
|
||||
<link href="/static/css/fontawesome-all.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
|
|
|
@ -44,7 +44,7 @@ export function get(
|
|||
dispatch(request());
|
||||
|
||||
// Fetch entities from backend.
|
||||
const url = new URL('http://localhost:8000/get-entities/');
|
||||
const url = new URL('/get-entities/', window.location.origin);
|
||||
const payload = new FormData();
|
||||
payload.append('locale', locale);
|
||||
payload.append('project', project);
|
||||
|
|
Загрузка…
Ссылка в новой задаче