]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
test: rever vite upgrade
authorEduardo San Martin Morote <posva13@gmail.com>
Thu, 5 Aug 2021 10:30:10 +0000 (12:30 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Thu, 5 Aug 2021 10:30:10 +0000 (12:30 +0200)
e2e/tsconfig.json
e2e/vite.config.js
package.json
yarn.lock

index 12c9a842eaf9992cd134aebd9be25506a099e2a0..d61bd724c8da44d3f9d9855519c52e90fbfc0d0c 100644 (file)
@@ -1,7 +1,7 @@
 {
   "include": ["index.ts", "*/*.ts", "../src/global.d.ts"],
   "compilerOptions": {
-    "target": "es5",
+    "target": "es6",
     "module": "commonjs",
     // "lib": ["es2017.object"] /* Specify library files to be included in the compilation. */,
     "declaration": true,
index 5046a32a940fa22adaeca452490fad84079445d1..d6e47bff159784a1d4ee5f965a4b564d845aac2a 100644 (file)
@@ -1,8 +1,8 @@
-const fs = require('fs')
-const { resolve, join } = require('path')
-const { defineConfig } = require('vite')
-const vue = require('@vitejs/plugin-vue')
-const history = require('connect-history-api-fallback')
+import fs from 'fs'
+import { resolve, join } from 'path'
+import { defineConfig } from 'vite'
+import vue from '@vitejs/plugin-vue'
+import history from 'connect-history-api-fallback'
 
 /** @type {string[]} */
 let examples = []
@@ -54,9 +54,15 @@ const config = (env = {}) => {
                   from: new RegExp(`^/${name}/.*$`),
                   to({ parsedUrl }) {
                     // console.log('checking for', parsedUrl.pathname)
-                    if (fs.existsSync(join(__dirname, parsedUrl.pathname))) {
+                    const filePath = join(__dirname, parsedUrl.pathname)
+                    if (
+                      fs.existsSync(filePath) &&
+                      !fs.statSync(filePath).isDirectory()
+                    ) {
+                      // console.log('\t', parsedUrl.pathname)
                       return parsedUrl.pathname
                     } else {
+                      // console.log('\t', `/${name}/index.html`)
                       return `/${name}/index.html`
                     }
                   },
@@ -65,6 +71,7 @@ const config = (env = {}) => {
                 {
                   from: /^\/@.*$/,
                   to({ parsedUrl }) {
+                    // console.log('bypassing', parsedUrl.pathname, parsedUrl.href)
                     return parsedUrl.href
                   },
                 },
index eb8934a7196c5748c63cba7cdc33aa451f0ab6c6..c06667706ce9b17a5d7f8ffd0218e6b754c71e2b 100644 (file)
     "selenium-server": "^3.141.59",
     "serve-handler": "^6.1.3",
     "typescript": "^4.3.5",
-    "vite": "^2.3.1",
+    "vite": "~2.3.1",
     "vitepress": "^0.14.1",
     "vue": "^3.1.0",
     "vue-tsc": "^0.2.2",
index 380df7d18598b1bc0f414b6324241a54944b9b8d..6f891f01737245a48d95c0515620421028319951 100644 (file)
--- a/yarn.lock
+++ b/yarn.lock
@@ -6460,7 +6460,7 @@ postcss-value-parser@^4.1.0:
   resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb"
   integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==
 
-postcss@^8.1.10, postcss@^8.2.15, postcss@^8.3.4, postcss@^8.3.6:
+postcss@^8.1.10, postcss@^8.2.15, postcss@^8.3.4:
   version "8.3.6"
   resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.6.tgz#2730dd76a97969f37f53b9a6096197be311cc4ea"
   integrity sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==
@@ -8220,19 +8220,7 @@ verror@1.10.0:
     core-util-is "1.0.2"
     extsprintf "^1.2.0"
 
-vite@^2.3.1:
-  version "2.4.4"
-  resolved "https://registry.yarnpkg.com/vite/-/vite-2.4.4.tgz#8c402a07ad45f168f6eb5428bead38f3e4363e47"
-  integrity sha512-m1wK6pFJKmaYA6AeZIUXyiAgUAAJzVXhIMYCdZUpCaFMGps0v0IlNJtbmPvkUhVEyautalajmnW5X6NboUPsnw==
-  dependencies:
-    esbuild "^0.12.8"
-    postcss "^8.3.6"
-    resolve "^1.20.0"
-    rollup "^2.38.5"
-  optionalDependencies:
-    fsevents "~2.3.2"
-
-vite@^2.3.7:
+vite@^2.3.7, vite@~2.3.1:
   version "2.3.8"
   resolved "https://registry.yarnpkg.com/vite/-/vite-2.3.8.tgz#42e3e03953859fd410e4e6ab3d1cca0aab2adc3c"
   integrity sha512-QiEx+iqNnJntSgSF2fWRQvRey9pORIrtNJzNyBJXwc+BdzWs83FQolX84cTBo393cfhObrtWa6180dAa4NLDiQ==