From c156e7342b680350f08eaf48ad4f78c9b2b1a08a Mon Sep 17 00:00:00 2001 From: Phan An Date: Fri, 29 Apr 2022 22:15:10 +0200 Subject: [PATCH] fix: demo build --- .eslintrc | 1 - package.json | 2 +- resources/assets/jest.config.js | 3 +-- .../assets/js/components/auth/LoginForm.vue | 5 +++-- .../assets/js/components/meta/AboutKoelModal.vue | 5 ++--- .../profile-preferences/ProfileForm.vue | 16 +++++++++++++--- resources/assets/js/types.d.ts | 3 +-- resources/assets/js/utils/common.ts | 2 ++ webpack.config.js | 3 +-- 9 files changed, 24 insertions(+), 16 deletions(-) diff --git a/.eslintrc b/.eslintrc index 644a877d26..2b7378f59b 100644 --- a/.eslintrc +++ b/.eslintrc @@ -22,7 +22,6 @@ ], "globals": { "KOEL_ENV": "readonly", - "NODE_ENV": "readonly", "FileReader": "readonly", "defineProps": "readonly", "defineEmits": "readonly", diff --git a/package.json b/package.json index b2001e3c2f..248093378a 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "test:e2e": "kill-port 8080 && start-test dev :8080 'cypress open'", "test:e2e:ci": "kill-port 8080 && start-test 'php artisan serve --port=8080 --quiet' http-get://localhost:8080/api/ping 'cypress run'", "build": "yarn prod", - "build-demo": "cross-env NODE_ENV=demo npm run production", + "build-demo": "cross-env KOEL_ENV=demo mix --production", "dev": "start-test 'php artisan serve --port=8000 --quiet' http-get://localhost:8000/api/ping hot", "development": "mix", "watch": "mix watch", diff --git a/resources/assets/jest.config.js b/resources/assets/jest.config.js index 7812cda1f5..6f42781053 100644 --- a/resources/assets/jest.config.js +++ b/resources/assets/jest.config.js @@ -28,8 +28,7 @@ module.exports = { `node_modules/(?!(${forceTransformModules.join('|')})/)` ], globals: { - KOEL_ENV: 'web', - NODE_ENV: 'test' + KOEL_ENV: '' }, setupFilesAfterEnv: ['/js/__tests__/setup.ts'], verbose: true, diff --git a/resources/assets/js/components/auth/LoginForm.vue b/resources/assets/js/components/auth/LoginForm.vue index 1b1af37c51..6a142d617f 100644 --- a/resources/assets/js/components/auth/LoginForm.vue +++ b/resources/assets/js/components/auth/LoginForm.vue @@ -12,6 +12,7 @@