Parcourir la source

chore(webapp): upgrade to vue-cli 5

Nils Wisiol il y a 3 ans
Parent
commit
fe5b2ca1aa
5 fichiers modifiés avec 9 ajouts et 14 suppressions
  1. 1 2
      docker-compose.dev.yml
  2. 0 1
      docker-compose.yml
  3. 6 6
      webapp/package.json
  4. 1 4
      webapp/vue.config.js
  5. 1 1
      www/90-desec.static.dev.content

+ 1 - 2
docker-compose.dev.yml

@@ -73,8 +73,7 @@ services:
     working_dir: /usr/src/app/
     working_dir: /usr/src/app/
     command: "npm run serve --fix"
     command: "npm run serve --fix"
     environment:
     environment:
-    - HOST=0.0.0.0
-    - PORT=443
+    - CODESANDBOX_SSE=1  # so that ws: protocol ends up as auto: in node_modules/@vue/cli-service/lib/commands/serve.js
     networks:
     networks:
     - rearwebapp
     - rearwebapp
     logging:
     logging:

+ 0 - 1
docker-compose.yml

@@ -219,7 +219,6 @@ services:
     build: webapp
     build: webapp
     environment:
     environment:
     - CYPRESS_INSTALL_BINARY=0  # workaround as Cypress otherwise needs write access to /root/.cache/
     - CYPRESS_INSTALL_BINARY=0  # workaround as Cypress otherwise needs write access to /root/.cache/
-    - VUE_APP_DESECSTACK_DOMAIN=${DESECSTACK_DOMAIN}
     - VUE_APP_DESECSTACK_NS=${DESECSTACK_NS}
     - VUE_APP_DESECSTACK_NS=${DESECSTACK_NS}
     - VUE_APP_DESECSTACK_API_SEPA_CREDITOR_ID=${DESECSTACK_API_SEPA_CREDITOR_ID}
     - VUE_APP_DESECSTACK_API_SEPA_CREDITOR_ID=${DESECSTACK_API_SEPA_CREDITOR_ID}
     - VUE_APP_DESECSTACK_API_SEPA_CREDITOR_NAME=${DESECSTACK_API_SEPA_CREDITOR_NAME}
     - VUE_APP_DESECSTACK_API_SEPA_CREDITOR_NAME=${DESECSTACK_API_SEPA_CREDITOR_NAME}

+ 6 - 6
webapp/package.json

@@ -24,13 +24,13 @@
     "vuex": "^3.6.2"
     "vuex": "^3.6.2"
   },
   },
   "devDependencies": {
   "devDependencies": {
-    "@vue/cli-plugin-babel": "^4.5.12",
-    "@vue/cli-plugin-e2e-cypress": "^4.5.12",
+    "@vue/cli-plugin-babel": "^5.0.6",
+    "@vue/cli-plugin-e2e-cypress": "^5.0.6",
     "@vue/cli-plugin-eslint": "^5.0.6",
     "@vue/cli-plugin-eslint": "^5.0.6",
-    "@vue/cli-plugin-router": "^4.5.12",
-    "@vue/cli-plugin-unit-mocha": "^4.5.12",
-    "@vue/cli-plugin-vuex": "^4.5.12",
-    "@vue/cli-service": "^4.5.12",
+    "@vue/cli-plugin-router": "^5.0.6",
+    "@vue/cli-plugin-unit-mocha": "^5.0.6",
+    "@vue/cli-plugin-vuex": "^5.0.6",
+    "@vue/cli-service": "^5.0.6",
     "@vue/test-utils": "1.1.3",
     "@vue/test-utils": "1.1.3",
     "babel-eslint": "^10.1.0",
     "babel-eslint": "^10.1.0",
     "chai": "^4.3.4",
     "chai": "^4.3.4",

+ 1 - 4
webapp/vue.config.js

@@ -1,10 +1,7 @@
 module.exports = {
 module.exports = {
   configureWebpack: {
   configureWebpack: {
     devServer: {
     devServer: {
-      disableHostCheck: true,
-      sockHost: 'desec.' + process.env.VUE_APP_DESECSTACK_DOMAIN,
-      public: 'https://desec.' + process.env.VUE_APP_DESECSTACK_DOMAIN + '/',
+      allowedHosts: 'all',
     },
     },
   },
   },
-  publicPath: '/',
 };
 };

+ 1 - 1
www/90-desec.static.dev.content

@@ -9,4 +9,4 @@ proxy_http_version 1.1;
 proxy_set_header Upgrade $http_upgrade;
 proxy_set_header Upgrade $http_upgrade;
 proxy_set_header Connection "upgrade";
 proxy_set_header Connection "upgrade";
 
 
-proxy_pass http://webapp:443; # FIXME Note that we use 443 for plain text communication, to make webpack dev tools use port 443, too. A vue-cli upgrade may help.
+proxy_pass http://webapp:8080;