diff --git a/frontend/Makefile b/frontend/Makefile index f7f2cfda..561cc1cc 100644 --- a/frontend/Makefile +++ b/frontend/Makefile @@ -11,7 +11,7 @@ install-production: compile .PHONY: install install: - yarn install --prefer-offline + NODE_ENV=development yarn install --prefer-offline .PHONY: clean clean: diff --git a/frontend/package.json b/frontend/package.json index 7df85961..9c0d54eb 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -15,7 +15,7 @@ "test": "make test", "open": "nyc report --reporter=html & open coverage/index.html", "coverage": "nyc check-coverage --statements 100 --functions 100 --lines 100 --branches 100", - "build-locales": " CONFIG=$(pwd)/webpack/index.js NODE_ENV=test babel-node scripts/build-locales", + "build-locales": " CONFIG=$(pwd)/webpack/index.js babel-node scripts/build-locales", "clean-static": "git check-ignore static/** | xargs rm" }, "dependencies": { diff --git a/frontend/webpack/paths.js b/frontend/webpack/paths.js index 1d154de0..4a173968 100644 --- a/frontend/webpack/paths.js +++ b/frontend/webpack/paths.js @@ -2,7 +2,9 @@ const path = require('path'); const ROOT = path.join(__dirname, '../..'); const UI = path.join(ROOT, 'ui'); -const FRONTEND = path.join(ROOT, 'frontend'); +const FRONTEND = process.env.NODE_ENV === 'production' + ? path.join(__dirname, '../') + : path.join(ROOT, 'frontend'); module.exports = { ROOT,