From 4ef9857d52bb61398d109200a45a122a33457d17 Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Thu, 26 Nov 2020 01:50:41 +0900 Subject: [PATCH 01/13] Simplify rootDir config to support ts extension --- core/config.cjs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/core/config.cjs b/core/config.cjs index 5da3203..e7a490a 100644 --- a/core/config.cjs +++ b/core/config.cjs @@ -1,18 +1,8 @@ const fs = require('fs') const path = require('path') -const viteConfigName = 'vite.config.js' - -let rootDir = process.cwd() -if (!fs.existsSync(path.resolve(rootDir, viteConfigName))) { - rootDir = path.resolve(process.cwd(), '..') - if (!fs.existsSync(path.resolve(rootDir, viteConfigName))) { - throw new Error(`Could not find ${viteConfigName}`) - } -} - module.exports = { - rootDir, + rootDir: process.cwd(), outDir: 'dist', clientOutDir: 'client', ssrOutDir: 'ssr', From c5cca9660f07f874ba56c5920dc527adee21e2be Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Thu, 26 Nov 2020 01:54:37 +0900 Subject: [PATCH 02/13] Add TS to example --- example/package.json | 6 +++++- example/tsconfig.json | 15 +++++++++++++++ example/yarn.lock | 40 ++++++++++++++++++++++++++++++++++++++-- 3 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 example/tsconfig.json diff --git a/example/package.json b/example/package.json index ed440c2..4584062 100644 --- a/example/package.json +++ b/example/package.json @@ -4,7 +4,7 @@ "type": "module", "scripts": { "setup": "yarn && (cd node-site && yarn) && (cd worker-site && yarn)", - "dev": "vite --open --esm", + "dev": "node --loader ts-node/esm node_modules/.bin/vite --open", "build": "rm -rf dist && vitedge build", "refresh": "rm -rf node_modules && yarn", "serve:worker": "cd worker-site && yarn serve", @@ -16,5 +16,9 @@ "vitedge": "../core", "vue": "^3.0.0", "vue-router": "^4.0.0-rc.1" + }, + "devDependencies": { + "ts-node": "^9.0.0", + "typescript": "^4.1.2" } } \ No newline at end of file diff --git a/example/tsconfig.json b/example/tsconfig.json new file mode 100644 index 0000000..8da7553 --- /dev/null +++ b/example/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "es2015", + "target": "es2019", + "strict": true, + "moduleResolution": "node", + "outDir": "dist", + "noEmitOnError": true, + "sourceMap": false, + "allowJs": true, + }, + "include": [ + "src/**/*" + ] +} \ No newline at end of file diff --git a/example/yarn.lock b/example/yarn.lock index 82c552e..da08c64 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -414,6 +414,11 @@ anymatch@~3.1.1: normalize-path "^3.0.0" picomatch "^2.0.4" +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -709,6 +714,11 @@ destroy@^1.0.4: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -1364,6 +1374,11 @@ magic-string@^0.25.7: dependencies: sourcemap-codec "^1.4.4" +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -1888,7 +1903,7 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -source-map-support@~0.5.19: +source-map-support@^0.5.17, source-map-support@~0.5.19: version "0.5.19" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== @@ -1980,6 +1995,17 @@ toidentifier@1.0.0: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== +ts-node@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.0.0.tgz#e7699d2a110cc8c0d3b831715e417688683460b3" + integrity sha512-/TqB4SnererCDR/vb4S/QvSZvzQMJN8daAslg7MeaiHvD8rDZsSfXmNeNumyZZzMned72Xoq/isQljYSt8Ynfg== + dependencies: + arg "^4.1.0" + diff "^4.0.1" + make-error "^1.1.1" + source-map-support "^0.5.17" + yn "3.1.1" + tsscmp@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb" @@ -1993,6 +2019,11 @@ type-is@^1.6.16: media-typer "0.3.0" mime-types "~2.1.24" +typescript@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9" + integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ== + uniq@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" @@ -2087,7 +2118,7 @@ vite@^1.0.0-rc.9: ws "^7.3.1" vitedge@../core: - version "0.1.0" + version "0.2.0" dependencies: "@cloudflare/kv-asset-handler" "^0.0.12" "@rollup/plugin-virtual" "^2.0.3" @@ -2152,3 +2183,8 @@ ylru@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/ylru/-/ylru-1.2.1.tgz#f576b63341547989c1de7ba288760923b27fe84f" integrity sha512-faQrqNMzcPCHGVC2aaOINk13K+aaBDUPjGWl0teOXywElLjyVAB6Oe2jj62jHYtwsU49jXhScYbvPENK+6zAvQ== + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== From f128910989a3925f192533230fa21f0d9e550368 Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Thu, 26 Nov 2020 01:54:58 +0900 Subject: [PATCH 03/13] Use .ts extension for example files --- example/index.html | 2 +- example/src/{main.js => main.ts} | 0 example/src/{routes.js => routes.ts} | 0 example/{vite.config.js => vite.config.ts} | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename example/src/{main.js => main.ts} (100%) rename example/src/{routes.js => routes.ts} (100%) rename example/{vite.config.js => vite.config.ts} (100%) diff --git a/example/index.html b/example/index.html index d49c18c..a508f20 100644 --- a/example/index.html +++ b/example/index.html @@ -8,6 +8,6 @@
- + diff --git a/example/src/main.js b/example/src/main.ts similarity index 100% rename from example/src/main.js rename to example/src/main.ts diff --git a/example/src/routes.js b/example/src/routes.ts similarity index 100% rename from example/src/routes.js rename to example/src/routes.ts diff --git a/example/vite.config.js b/example/vite.config.ts similarity index 100% rename from example/vite.config.js rename to example/vite.config.ts From 212569f9b2caa55ee97c5674b6924e65c77d6798 Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Thu, 26 Nov 2020 02:06:14 +0900 Subject: [PATCH 04/13] Revert "Simplify rootDir config to support ts extension" This reverts commit 4ef9857d52bb61398d109200a45a122a33457d17. --- core/config.cjs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/core/config.cjs b/core/config.cjs index e7a490a..5da3203 100644 --- a/core/config.cjs +++ b/core/config.cjs @@ -1,8 +1,18 @@ const fs = require('fs') const path = require('path') +const viteConfigName = 'vite.config.js' + +let rootDir = process.cwd() +if (!fs.existsSync(path.resolve(rootDir, viteConfigName))) { + rootDir = path.resolve(process.cwd(), '..') + if (!fs.existsSync(path.resolve(rootDir, viteConfigName))) { + throw new Error(`Could not find ${viteConfigName}`) + } +} + module.exports = { - rootDir: process.cwd(), + rootDir, outDir: 'dist', clientOutDir: 'client', ssrOutDir: 'ssr', From 9a00564e7e5cff9203adf1233c7e4fb8df224f89 Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Thu, 26 Nov 2020 02:30:40 +0900 Subject: [PATCH 05/13] Find parent dir with Vite config and detect TS --- core/config.cjs | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/core/config.cjs b/core/config.cjs index 5da3203..386fdd2 100644 --- a/core/config.cjs +++ b/core/config.cjs @@ -1,17 +1,30 @@ const fs = require('fs') const path = require('path') -const viteConfigName = 'vite.config.js' +const systemRoot = path.parse(process.cwd()).root +const fileExists = (dir, file) => fs.existsSync(path.resolve(dir, file)) -let rootDir = process.cwd() -if (!fs.existsSync(path.resolve(rootDir, viteConfigName))) { - rootDir = path.resolve(process.cwd(), '..') - if (!fs.existsSync(path.resolve(rootDir, viteConfigName))) { - throw new Error(`Could not find ${viteConfigName}`) +let rootDir +let currentDir = process.cwd() +let isTS = false + +while (!rootDir && currentDir !== systemRoot) { + if (fileExists(currentDir, 'vite.config.js')) { + rootDir = currentDir + } else if (fileExists(currentDir, 'vite.config.ts')) { + isTS = true + rootDir = currentDir + } else { + currentDir = path.resolve(currentDir, '..') } } +if (!rootDir) { + throw new Error(`Could not find Vite config file`) +} + module.exports = { + isTS, rootDir, outDir: 'dist', clientOutDir: 'client', From 9978224683a138f3d9c692d82472f13668bc442f Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Thu, 26 Nov 2020 03:14:52 +0900 Subject: [PATCH 06/13] Add dev command to CLI --- core/bin/cli.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/bin/cli.js b/core/bin/cli.js index f932bb6..dcb0a2a 100755 --- a/core/bin/cli.js +++ b/core/bin/cli.js @@ -3,6 +3,7 @@ import path from 'path' import { promises as fs } from 'fs' import { createRequire } from 'module' +import cp from 'child_process' const [, , command, ...args] = process.argv @@ -29,6 +30,12 @@ const patchVite = async () => { const { default: build } = await import('vitedge/build/index.js') await build() process.exit() + } else if (command === 'dev') { + args.unshift('node_modules/.bin/vite') + + cp.spawn('node', args, { + stdio: [process.stdin, process.stdout, process.stderr], + }) } else if (command === 'patch') { await patchVite() process.exit() From ea8f11f9017f1d316c5c26cc13a93acc0ba198e5 Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Thu, 26 Nov 2020 03:15:40 +0900 Subject: [PATCH 07/13] Support TS dev in CLI --- core/bin/cli.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/core/bin/cli.js b/core/bin/cli.js index dcb0a2a..3b86a9a 100755 --- a/core/bin/cli.js +++ b/core/bin/cli.js @@ -15,10 +15,14 @@ const patchVite = async () => { try { await fs.writeFile( viteConfigLoader, - (await fs.readFile(viteConfigLoader, 'utf8')).replace( - /\srequire\(resolvedPath\)/, - ' await import(resolvedPath); config = config.default || config' - ) + (await fs.readFile(viteConfigLoader, 'utf8')) + // Use native ESM to import config file instead of Rollup + .replace( + /\srequire\(resolvedPath\)/, + ' await import(resolvedPath); config = config.default || config' + ) + // Ignore TS check to keep using native ESM with ts-node instead of Rollup + .replace(/if\s+\(!isTS\)/i, 'if (true)') ) } catch (error) { console.warn('Vitedge could not patch Vite:', error.message) @@ -33,6 +37,11 @@ const patchVite = async () => { } else if (command === 'dev') { args.unshift('node_modules/.bin/vite') + const { default: config } = await import('vitedge/config.cjs') + if (config.isTS) { + args.unshift('--loader', 'ts-node/esm') + } + cp.spawn('node', args, { stdio: [process.stdin, process.stdout, process.stderr], }) From 7f05705e2cfc431708321f982393cccdb688e514 Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Thu, 26 Nov 2020 03:20:30 +0900 Subject: [PATCH 08/13] Use Vitedge CLI for dev --- README.md | 4 ++-- example/package.json | 4 ++-- example/tsconfig.json | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7c5cbf8..b274125 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Other providers (Netlify, Vercel, etc.) offer free tier generally. 3. Import `vitedge/plugin.js` in your `vite.config.js`. [Example here](./example/vite.config.js). 4. Import and call Vitedge from your app's entry point providing your main `App.vue` and your page routes. Vitedge will create the router and attach the app to the DOM for you according to the running environment. [Example here](./example/src/main.js). 5. Add page props or API handlers in [functions directory](./example/functions). -6. Develop locally with Vite's blazing fast HMR running `vite --open`. +6. Develop locally with Vite's blazing fast HMR running `vitedge dev --open` (pass any Vite CLI option). When using TypeScript, make sure `typescript` and `ts-node` are installed as devDependencies. 7. Build using `vitedge build` command, import `vitedge/worker` in your [worker entry point](./example/worker-site/index.js) and add a custom [Webpack config](./example/worker-site/webpack.config.js). ## TODOS - Raw ideas @@ -53,7 +53,7 @@ Other providers (Netlify, Vercel, etc.) offer free tier generally. - [ ] Auth utilities (passing JWT in requests) - [ ] List of pages that should be prerrendered automatically after deployment - [x] Compatibility with Node runtime for other providers (Vercel/...) -- [ ] Detect imported files in HTML and push them with HTTP2 +- [ ] Detect imported files in HTML and push them with HTTP/2 - [ ] Sitemap utility (handler in `/functions/sitemap.js`?) - [ ] React/Preact compatibility. diff --git a/example/package.json b/example/package.json index 4584062..bcf65f3 100644 --- a/example/package.json +++ b/example/package.json @@ -4,9 +4,9 @@ "type": "module", "scripts": { "setup": "yarn && (cd node-site && yarn) && (cd worker-site && yarn)", - "dev": "node --loader ts-node/esm node_modules/.bin/vite --open", + "dev": "vitedge dev --open", "build": "rm -rf dist && vitedge build", - "refresh": "rm -rf node_modules && yarn", + "refresh": "rm -rf node_modules/vitedge && cp -r ../core node_modules/vitedge && cp ../core/bin/cli.js node_modules/.bin/vitedge", "serve:worker": "cd worker-site && yarn serve", "serve:node": "cd node-site && yarn serve", "postinstall": "vitedge patch" diff --git a/example/tsconfig.json b/example/tsconfig.json index 8da7553..e853ff8 100644 --- a/example/tsconfig.json +++ b/example/tsconfig.json @@ -8,6 +8,7 @@ "noEmitOnError": true, "sourceMap": false, "allowJs": true, + "noImplicitAny": false, }, "include": [ "src/**/*" From c83a2a8f509d7e034e5e333af9de8862906c7dbc Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Thu, 26 Nov 2020 04:02:46 +0900 Subject: [PATCH 09/13] Use TS in functions --- example/functions/api/hello/{world.js => world.ts} | 0 example/functions/props/{default.js => default.ts} | 0 example/functions/props/{example.js => example.ts} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename example/functions/api/hello/{world.js => world.ts} (100%) rename example/functions/props/{default.js => default.ts} (100%) rename example/functions/props/{example.js => example.ts} (100%) diff --git a/example/functions/api/hello/world.js b/example/functions/api/hello/world.ts similarity index 100% rename from example/functions/api/hello/world.js rename to example/functions/api/hello/world.ts diff --git a/example/functions/props/default.js b/example/functions/props/default.ts similarity index 100% rename from example/functions/props/default.js rename to example/functions/props/default.ts diff --git a/example/functions/props/example.js b/example/functions/props/example.ts similarity index 100% rename from example/functions/props/example.js rename to example/functions/props/example.ts From 7ae654e7d573e1422dea9ffccbf276314509807a Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Fri, 27 Nov 2020 03:50:58 +0900 Subject: [PATCH 10/13] Perf: Bust ESM cache only when files change --- core/plugin.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/core/plugin.js b/core/plugin.js index e90dfe3..0e57d91 100644 --- a/core/plugin.js +++ b/core/plugin.js @@ -12,11 +12,19 @@ export default { server, // raw http server instance watcher, // chokidar file watcher instance }) => { + const cacheBust = new Map() + watcher.on('change', (fullPath) => { + if (fullPath.replace(root, '').startsWith('/functions/')) { + const filePath = fullPath.replace(/\.[jt]sx?$/i, '') + cacheBust.set(filePath, (cacheBust.get(filePath) || 0) + 1) + } + }) + async function handleFunctionRequest(ctx, functionPath) { try { - const filePath = root + '/functions' + functionPath + '.js' - const cacheBust = `?cacheBust=${Math.random().toString(36).substr(2)}` - let endpointMeta = await import(filePath + cacheBust) + const filePath = root + '/functions' + functionPath + const cacheBust = `?cacheBust=${cacheBust.get(filePath) || 0}` + let endpointMeta = await import(filePath + '.js' + cacheBust) if (endpointMeta) { endpointMeta = endpointMeta.default || endpointMeta From e02215c8aabe24dfc233bb2a6e5d87dc6213bb07 Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Fri, 27 Nov 2020 04:20:30 +0900 Subject: [PATCH 11/13] Fix variable name --- core/plugin.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/plugin.js b/core/plugin.js index 0e57d91..0708415 100644 --- a/core/plugin.js +++ b/core/plugin.js @@ -23,8 +23,9 @@ export default { async function handleFunctionRequest(ctx, functionPath) { try { const filePath = root + '/functions' + functionPath - const cacheBust = `?cacheBust=${cacheBust.get(filePath) || 0}` - let endpointMeta = await import(filePath + '.js' + cacheBust) + let endpointMeta = await import( + filePath + '.js' + `?cacheBust=${cacheBust.get(filePath) || 0}` + ) if (endpointMeta) { endpointMeta = endpointMeta.default || endpointMeta From 1436f624e69c0e8094e7178009dc9889c619b8fc Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Fri, 27 Nov 2020 04:20:52 +0900 Subject: [PATCH 12/13] Detect ts-node in CLI --- core/bin/cli.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/bin/cli.js b/core/bin/cli.js index 3b86a9a..616bd90 100755 --- a/core/bin/cli.js +++ b/core/bin/cli.js @@ -22,7 +22,10 @@ const patchVite = async () => { ' await import(resolvedPath); config = config.default || config' ) // Ignore TS check to keep using native ESM with ts-node instead of Rollup - .replace(/if\s+\(!isTS\)/i, 'if (true)') + .replace( + /if\s+\(!isTS\)/i, + 'if (!isTS || process[Symbol.for("ts-node.register.instance")])' + ) ) } catch (error) { console.warn('Vitedge could not patch Vite:', error.message) From 7807968ca3b5b5763f7c9f60bb60baaa1595ad0a Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Sun, 29 Nov 2020 01:09:45 +0900 Subject: [PATCH 13/13] Update vite and vite-ssr dependencies --- core/build/index.js | 2 +- core/config.cjs | 28 +---- core/package.json | 2 +- core/webpack.cjs | 7 +- core/yarn.lock | 271 +------------------------------------------ example/package.json | 2 +- example/yarn.lock | 189 ++++++++++++++++++++++-------- 7 files changed, 150 insertions(+), 351 deletions(-) diff --git a/core/build/index.js b/core/build/index.js index 32bb30f..c6469aa 100644 --- a/core/build/index.js +++ b/core/build/index.js @@ -1,5 +1,5 @@ import path from 'path' -import buildSSR from 'vite-ssr/build/index.js' +import buildSSR from 'vite-ssr/build.js' import buildFunctions from './functions.js' import config from '../config.cjs' diff --git a/core/config.cjs b/core/config.cjs index 386fdd2..7ef2359 100644 --- a/core/config.cjs +++ b/core/config.cjs @@ -1,31 +1,7 @@ -const fs = require('fs') -const path = require('path') - -const systemRoot = path.parse(process.cwd()).root -const fileExists = (dir, file) => fs.existsSync(path.resolve(dir, file)) - -let rootDir -let currentDir = process.cwd() -let isTS = false - -while (!rootDir && currentDir !== systemRoot) { - if (fileExists(currentDir, 'vite.config.js')) { - rootDir = currentDir - } else if (fileExists(currentDir, 'vite.config.ts')) { - isTS = true - rootDir = currentDir - } else { - currentDir = path.resolve(currentDir, '..') - } -} - -if (!rootDir) { - throw new Error(`Could not find Vite config file`) -} +const { getProjectInfo } = require('vite-ssr/config') module.exports = { - isTS, - rootDir, + ...getProjectInfo(), outDir: 'dist', clientOutDir: 'client', ssrOutDir: 'ssr', diff --git a/core/package.json b/core/package.json index 300f165..d23ca99 100644 --- a/core/package.json +++ b/core/package.json @@ -37,6 +37,6 @@ "@rollup/plugin-virtual": "^2.0.3", "fast-glob": "^3.2.4", "rollup": "^2.33.1", - "vite-ssr": "^0.0.6" + "vite-ssr": "^0.0.7" } } \ No newline at end of file diff --git a/core/webpack.cjs b/core/webpack.cjs index 62ff5b6..94561ef 100644 --- a/core/webpack.cjs +++ b/core/webpack.cjs @@ -7,12 +7,7 @@ module.exports = { resolve: { mainFields: ['main', 'module'], alias: { - __vitedge_router__: path.resolve( - rootDir, - outDir, - ssrOutDir, - '_assets/src/main.js' - ), + __vitedge_router__: path.resolve(rootDir, outDir, ssrOutDir), __vitedge_functions__: path.resolve(rootDir, outDir, fnsOutFile), }, }, diff --git a/core/yarn.lock b/core/yarn.lock index 060a9cb..769a63c 100644 --- a/core/yarn.lock +++ b/core/yarn.lock @@ -107,28 +107,6 @@ "@vue/compiler-core" "3.0.2" "@vue/shared" "3.0.2" -"@vue/compiler-sfc@^3.0.0": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.0.2.tgz#22c70fed72c347a4d5fa2db2e80594b3193dce57" - integrity sha512-viYjT5ehDSLM3v0jQ9hbTs4I5e/7lSlYsDOp7TQ1qcwHRvzoTQMTkFpY/Iae+LFKM124Ld17tBfXgfrZl9dt+g== - dependencies: - "@babel/parser" "^7.12.0" - "@babel/types" "^7.12.0" - "@vue/compiler-core" "3.0.2" - "@vue/compiler-dom" "3.0.2" - "@vue/compiler-ssr" "3.0.2" - "@vue/shared" "3.0.2" - consolidate "^0.16.0" - estree-walker "^2.0.1" - hash-sum "^2.0.0" - lru-cache "^5.1.1" - magic-string "^0.25.7" - merge-source-map "^1.1.0" - postcss "^7.0.32" - postcss-modules "^3.2.2" - postcss-selector-parser "^6.0.4" - source-map "^0.6.1" - "@vue/compiler-ssr@3.0.2": version "3.0.2" resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.0.2.tgz#73af4d274a79bfcc72a996a9b45f1072e7deaa26" @@ -150,23 +128,6 @@ resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.2.tgz#419bd85a2ebdbd4f42963e98c5a1b103452176d9" integrity sha512-Zx869zlNoujFOclKIoYmkh8ES2RcS/+Jn546yOiPyZ+3+Ejivnr+fb8l+DdXUEFjo+iVDNR3KyLzg03aBFfZ4Q== -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - -bluebird@^3.7.2: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - braces@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -174,49 +135,6 @@ braces@^3.0.1: dependencies: fill-range "^7.0.1" -chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -consolidate@^0.16.0: - version "0.16.0" - resolved "https://registry.yarnpkg.com/consolidate/-/consolidate-0.16.0.tgz#a11864768930f2f19431660a65906668f5fbdc16" - integrity sha512-Nhl1wzCslqXYTJVDyJCu3ODohy9OfBMB5uD2BiBTzd7w+QY0lBzafkR8y8755yMYHAaMD4NuzbAw03/xzfw+eQ== - dependencies: - bluebird "^3.7.2" - -cssesc@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" - integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== - -emojis-list@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" - integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - estree-walker@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" @@ -258,13 +176,6 @@ fsevents@~2.1.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== -generic-names@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/generic-names/-/generic-names-2.0.1.tgz#f8a378ead2ccaa7a34f0317b05554832ae41b872" - integrity sha512-kPCHWa1m9wGG/OwQpeweTwM/PYiQLrUIxXbt/P4Nic3LbGjCP0YwrALHW1uNLKZ0LIMg+RF+XRlj2ekT9ZlZAQ== - dependencies: - loader-utils "^1.1.0" - glob-parent@^5.1.0: version "5.1.1" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" @@ -272,33 +183,6 @@ glob-parent@^5.1.0: dependencies: is-glob "^4.0.1" -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -hash-sum@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/hash-sum/-/hash-sum-2.0.0.tgz#81d01bb5de8ea4a214ad5d6ead1b523460b0b45a" - integrity sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg== - -icss-replace-symbols@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" - integrity sha1-Bupvg2ead0njhs/h/oEq5dsiPe0= - -icss-utils@^4.0.0, icss-utils@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-4.1.1.tgz#21170b53789ee27447c2f47dd683081403f9a467" - integrity sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA== - dependencies: - postcss "^7.0.14" - -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= - is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -321,39 +205,11 @@ is-plain-obj@^2.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== -json5@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== - dependencies: - minimist "^1.2.0" - -loader-utils@^1.1.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" - integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^1.0.1" - -lodash.camelcase@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" - integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= - lodash@^4.17.19: version "4.17.20" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - magic-string@^0.25.7: version "0.25.7" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" @@ -368,13 +224,6 @@ merge-options@^3.0.3: dependencies: is-plain-obj "^2.1.0" -merge-source-map@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646" - integrity sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw== - dependencies: - source-map "^0.6.1" - merge2@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" @@ -393,88 +242,11 @@ mime@^2.4.6: resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.6.tgz#e5b407c90db442f2beb5b162373d07b69affa4d1" integrity sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA== -minimist@^1.2.0: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - picomatch@^2.0.5, picomatch@^2.2.1, picomatch@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== -postcss-modules-extract-imports@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz#818719a1ae1da325f9832446b01136eeb493cd7e" - integrity sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ== - dependencies: - postcss "^7.0.5" - -postcss-modules-local-by-default@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.3.tgz#bb14e0cc78279d504dbdcbfd7e0ca28993ffbbb0" - integrity sha512-e3xDq+LotiGesympRlKNgaJ0PCzoUIdpH0dj47iWAui/kyTgh3CiAr1qP54uodmJhl6p9rN6BoNcdEDVJx9RDw== - dependencies: - icss-utils "^4.1.1" - postcss "^7.0.32" - postcss-selector-parser "^6.0.2" - postcss-value-parser "^4.1.0" - -postcss-modules-scope@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz#385cae013cc7743f5a7d7602d1073a89eaae62ee" - integrity sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ== - dependencies: - postcss "^7.0.6" - postcss-selector-parser "^6.0.0" - -postcss-modules-values@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz#5b5000d6ebae29b4255301b4a3a54574423e7f10" - integrity sha512-1//E5jCBrZ9DmRX+zCtmQtRSV6PV42Ix7Bzj9GbwJceduuf7IqP8MgeTXuRDHOWj2m0VzZD5+roFWDuU8RQjcg== - dependencies: - icss-utils "^4.0.0" - postcss "^7.0.6" - -postcss-modules@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/postcss-modules/-/postcss-modules-3.2.2.tgz#ee390de0f9f18e761e1778dfb9be26685c02c51f" - integrity sha512-JQ8IAqHELxC0N6tyCg2UF40pACY5oiL6UpiqqcIFRWqgDYO8B0jnxzoQ0EOpPrWXvcpu6BSbQU/3vSiq7w8Nhw== - dependencies: - generic-names "^2.0.1" - icss-replace-symbols "^1.1.0" - lodash.camelcase "^4.3.0" - postcss "^7.0.32" - postcss-modules-extract-imports "^2.0.0" - postcss-modules-local-by-default "^3.0.2" - postcss-modules-scope "^2.2.0" - postcss-modules-values "^3.0.0" - string-hash "^1.1.1" - -postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4: - version "6.0.4" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz#56075a1380a04604c38b063ea7767a129af5c2b3" - integrity sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw== - dependencies: - cssesc "^3.0.0" - indexes-of "^1.0.1" - uniq "^1.0.1" - util-deprecate "^1.0.2" - -postcss-value-parser@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" - integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== - -postcss@^7.0.14, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6: - version "7.0.35" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.35.tgz#d2be00b998f7f211d8a276974079f2e92b970e24" - integrity sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg== - dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" - reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -502,25 +274,6 @@ sourcemap-codec@^1.4.4: resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== -string-hash@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b" - integrity sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs= - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" - integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== - dependencies: - has-flag "^3.0.0" - to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" @@ -533,27 +286,11 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= - -util-deprecate@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -vite-ssr@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/vite-ssr/-/vite-ssr-0.0.6.tgz#5f832a12d04943a1c673b50d80007bf7ecde0b3b" - integrity sha512-L8w9oppkDO7FAlJJJlgnRSbshKpuRgP7og1AQzxW5gii14b5QS4BQybVzO+EVzbcoyhyIzhHowHkL4hvlEXANw== +vite-ssr@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/vite-ssr/-/vite-ssr-0.0.7.tgz#27732afce22ac8433cd296f67f11b3d92287eff2" + integrity sha512-liNePmu4pExPKDgMGLkC/U0cBRAkVALSwm0A9+A4LjhXK3Rj3Wyawun+kG6TnP2VD94Aercqp/uuMMzacMFcYw== dependencies: "@rollup/plugin-replace" "^2.3.3" - "@vue/compiler-sfc" "^3.0.0" "@vue/server-renderer" "^3.0.0" merge-options "^3.0.3" - -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== diff --git a/example/package.json b/example/package.json index bcf65f3..ca919eb 100644 --- a/example/package.json +++ b/example/package.json @@ -12,7 +12,7 @@ "postinstall": "vitedge patch" }, "dependencies": { - "vite": "^1.0.0-rc.9", + "vite": "^1.0.0-rc.13", "vitedge": "../core", "vue": "^3.0.0", "vue-router": "^4.0.0-rc.1" diff --git a/example/yarn.lock b/example/yarn.lock index da08c64..bcb9772 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -23,11 +23,16 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.12.0", "@babel/parser@^7.12.3": +"@babel/parser@^7.12.0": version "7.12.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.3.tgz#a305415ebe7a6c7023b40b5122a0662d928334cd" integrity sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw== +"@babel/parser@^7.12.7": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.7.tgz#fee7b39fe809d0e73e5b25eecaf5780ef3d73056" + integrity sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg== + "@babel/types@^7.12.0": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.1.tgz#e109d9ab99a8de735be287ee3d6a9947a190c4ae" @@ -79,10 +84,10 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@rollup/plugin-commonjs@^15.1.0": - version "15.1.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-15.1.0.tgz#1e7d076c4f1b2abf7e65248570e555defc37c238" - integrity sha512-xCQqz4z/o0h2syQ7d9LskIMvBSH4PX5PjYdpSSvgS+pQik3WahkQVNWg3D8XJeYjZoVWnIUQYDghuEMRGrmQYQ== +"@rollup/plugin-commonjs@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-16.0.0.tgz#169004d56cd0f0a1d0f35915d31a036b0efe281f" + integrity sha512-LuNyypCP3msCGVQJ7ki8PqYdpjfEkE/xtFa5DqlF+7IBD0JsfMZ87C58heSwIMint58sAUZbt3ITqOmdQv/dXw== dependencies: "@rollup/pluginutils" "^3.1.0" commondir "^1.0.1" @@ -99,10 +104,10 @@ dependencies: "@rollup/pluginutils" "^3.0.8" -"@rollup/plugin-node-resolve@^9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-9.0.0.tgz#39bd0034ce9126b39c1699695f440b4b7d2b62e6" - integrity sha512-gPz+utFHLRrd41WMP13Jq5mqqzHL3OXrfj3/MkSyB6UBIcuNt9j60GCbarzMzdf1VHFpOxfQh/ez7wyadLMqkg== +"@rollup/plugin-node-resolve@^10.0.0": + version "10.0.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-10.0.0.tgz#44064a2b98df7530e66acf8941ff262fc9b4ead8" + integrity sha512-sNijGta8fqzwA1VwUEtTvWCx2E7qC70NMsDh4ZG13byAXYigBNZMxALhKUSycBks5gupJdq0lFrKumFrRZ8H3A== dependencies: "@rollup/pluginutils" "^3.1.0" "@types/resolve" "1.17.1" @@ -133,7 +138,7 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@rollup/pluginutils@^4.0.0": +"@rollup/pluginutils@^4.1.0": version "4.1.0" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.1.0.tgz#0dcc61c780e39257554feb7f77207dceca13c838" integrity sha512-TrBhfJkFxA+ER+ew2U2/fHbebhLT/l/2pRk0hfj9KusXUuRXd2v0R58AfaZK9VXDQ4TogOSEmICVrQAA3zFnHQ== @@ -217,6 +222,13 @@ resolved "https://registry.yarnpkg.com/@types/http-errors/-/http-errors-1.8.0.tgz#682477dbbbd07cd032731cb3b0e7eaee3d026b69" integrity sha512-2aoSC4UUbHDj2uCsCxcG/vRMXey/m17bC7UwitVm5hn22nI8O8Y9iDpA76Orc+DWkQ4zZrOKEshCqR/jSuXAHA== +"@types/http-proxy@^1.17.4": + version "1.17.4" + resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.4.tgz#e7c92e3dbe3e13aa799440ff42e6d3a17a9d045b" + integrity sha512-IrSHl2u6AWXduUaDLqYpt45tLVCtYv7o4Z0s1KghBCDgIIS9oW5K1H8mZG/A2CfeLdEa7rTd1ACOiHBc1EMT2Q== + dependencies: + "@types/node" "*" + "@types/keygrip@*": version "1.0.2" resolved "https://registry.yarnpkg.com/@types/keygrip/-/keygrip-1.0.2.tgz#513abfd256d7ad0bf1ee1873606317b33b1b2a72" @@ -299,7 +311,18 @@ estree-walker "^2.0.1" source-map "^0.6.1" -"@vue/compiler-dom@3.0.2", "@vue/compiler-dom@^3.0.2": +"@vue/compiler-core@3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.3.tgz#dbb4d5eb91f294038f0bed170a1c25f59f7dc74f" + integrity sha512-iWlRT8RYLmz7zkg84pTOriNUzjH7XACWN++ImFkskWXWeev29IKi7p76T9jKDaMZoPiGcUZ0k9wayuASWVxOwg== + dependencies: + "@babel/parser" "^7.12.0" + "@babel/types" "^7.12.0" + "@vue/shared" "3.0.3" + estree-walker "^2.0.1" + source-map "^0.6.1" + +"@vue/compiler-dom@3.0.2": version "3.0.2" resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.2.tgz#1d40de04bcdf9aabb79fb6a802dd70a2f3c2992a" integrity sha512-jvaL4QF2yXBJVD+JLbM2YA3e5fNfflJnfQ+GtfYk46ENGsEetqbkZqcX7fO+RHdG8tZBo7LCNBvgD0QLr+V4sg== @@ -307,17 +330,25 @@ "@vue/compiler-core" "3.0.2" "@vue/shared" "3.0.2" -"@vue/compiler-sfc@^3.0.0", "@vue/compiler-sfc@^3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.0.2.tgz#22c70fed72c347a4d5fa2db2e80594b3193dce57" - integrity sha512-viYjT5ehDSLM3v0jQ9hbTs4I5e/7lSlYsDOp7TQ1qcwHRvzoTQMTkFpY/Iae+LFKM124Ld17tBfXgfrZl9dt+g== +"@vue/compiler-dom@3.0.3", "@vue/compiler-dom@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.3.tgz#582ba30bc82da8409868bc1153ff0e0e2be617e5" + integrity sha512-6GdUbDPjsc0MDZGAgpi4lox+d+aW9/brscwBOLOFfy9wcI9b6yLPmBbjdIsJq3pYdJWbdvACdJ77avBBdHEP8A== + dependencies: + "@vue/compiler-core" "3.0.3" + "@vue/shared" "3.0.3" + +"@vue/compiler-sfc@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.0.3.tgz#7fad9d40e139dd717713c0db701e1eb776f8349f" + integrity sha512-YocHSirye85kRVC4lU0+SE6uhrwGJzbhwkrqG4g6kmsAUopZ0qUjbICMlej5bYx2+AUz9yBIM7hpK8nIKFVFjg== dependencies: "@babel/parser" "^7.12.0" "@babel/types" "^7.12.0" - "@vue/compiler-core" "3.0.2" - "@vue/compiler-dom" "3.0.2" - "@vue/compiler-ssr" "3.0.2" - "@vue/shared" "3.0.2" + "@vue/compiler-core" "3.0.3" + "@vue/compiler-dom" "3.0.3" + "@vue/compiler-ssr" "3.0.3" + "@vue/shared" "3.0.3" consolidate "^0.16.0" estree-walker "^2.0.1" hash-sum "^2.0.0" @@ -337,6 +368,14 @@ "@vue/compiler-dom" "3.0.2" "@vue/shared" "3.0.2" +"@vue/compiler-ssr@3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.0.3.tgz#7d9e5c1b8c71d69865ac6c48d2e6eb2eecb68501" + integrity sha512-IjJMoHCiDk939Ix7Q5wrex59TVJr6JFQ95gf36f4G4UrVau0GGY/3HudnWT/6eyWJ7267+odqQs1uCZgDfL/Ww== + dependencies: + "@vue/compiler-dom" "3.0.3" + "@vue/shared" "3.0.3" + "@vue/reactivity@3.0.2": version "3.0.2" resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.2.tgz#42ed5af6025b494a5e69b05169fcddf04eebfe77" @@ -344,6 +383,13 @@ dependencies: "@vue/shared" "3.0.2" +"@vue/reactivity@3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.3.tgz#681ee01ceff9219bc4da6bbb7d9c97d452e44d1d" + integrity sha512-t39Qmc42MX7wJtf8L6tHlu17eP9Rc5w4aRnxpLHNWoaRxddv/7FBhWqusJ2Bwkk8ixFHOQeejcLMt5G469WYJw== + dependencies: + "@vue/shared" "3.0.3" + "@vue/runtime-core@3.0.2": version "3.0.2" resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.2.tgz#d7ed462af1cb0bf9836668e4e6fab3f2f4b1bc00" @@ -352,6 +398,14 @@ "@vue/reactivity" "3.0.2" "@vue/shared" "3.0.2" +"@vue/runtime-core@3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.3.tgz#edab3c9ad122cf8afd034b174cd20c073fbf950a" + integrity sha512-Fd1JVnYI6at0W/2ERwJuTSq4S22gNt8bKEbICcvCAac7hJUZ1rylThlrhsvrgA+DVkWU01r0niNZQ4UddlNw7g== + dependencies: + "@vue/reactivity" "3.0.3" + "@vue/shared" "3.0.3" + "@vue/runtime-dom@3.0.2": version "3.0.2" resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.2.tgz#9d166d03225558025d3d80f5039b646e0051b71c" @@ -361,6 +415,15 @@ "@vue/shared" "3.0.2" csstype "^2.6.8" +"@vue/runtime-dom@3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.3.tgz#5e3e5e5418b9defcac988d2be0cf65596fa2cc03" + integrity sha512-ytTvSlRaEYvLQUkkpruIBizWIwuIeHER0Ch/evO6kUaPLjZjX3NerVxA40cqJx8rRjb9keQso21U2Jcpk8GsTg== + dependencies: + "@vue/runtime-core" "3.0.3" + "@vue/shared" "3.0.3" + csstype "^2.6.8" + "@vue/server-renderer@^3.0.0": version "3.0.2" resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.0.2.tgz#8de44d316e39f4e2166b574e7a535249dc0bc546" @@ -374,6 +437,11 @@ resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.2.tgz#419bd85a2ebdbd4f42963e98c5a1b103452176d9" integrity sha512-Zx869zlNoujFOclKIoYmkh8ES2RcS/+Jn546yOiPyZ+3+Ejivnr+fb8l+DdXUEFjo+iVDNR3KyLzg03aBFfZ4Q== +"@vue/shared@3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.3.tgz#ef12ebff93a446df281e8a0fd765b5aea8e7745b" + integrity sha512-yGgkF7u4W0Dmwri9XdeY50kOowN4UIX7aBQ///jbxx37itpzVjK7QzvD3ltQtPfWaJDGBfssGL0wpAgwX9OJpQ== + accepts@^1.3.5: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -486,6 +554,11 @@ builtin-modules@^3.1.0: resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.1.0.tgz#aad97c15131eb76b65b50ef208e7584cd76a7484" integrity sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw== +cac@^6.6.1: + version "6.6.1" + resolved "https://registry.yarnpkg.com/cac/-/cac-6.6.1.tgz#3dde3f6943f45d42a56729ea3573c08b3e7b6a6d" + integrity sha512-uhki4T3Ax68hw7Dufi0bATVAF8ayBSwOKUEJHjObPrUN4tlQ8Lf7oljpTje/mArLxYN0D743c2zJt4C1bVTCqg== + cache-content-type@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-content-type/-/cache-content-type-1.0.1.tgz#035cde2b08ee2129f4a8315ea8f00a00dba1453c" @@ -670,6 +743,13 @@ debug@^4.1.1: dependencies: ms "2.1.2" +debug@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + debug@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" @@ -775,10 +855,10 @@ es-module-lexer@^0.3.25: resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.3.26.tgz#7b507044e97d5b03b01d4392c74ffeb9c177a83b" integrity sha512-Va0Q/xqtrss45hWzP8CZJwzGSZJjDM5/MJRE3IXXnUCcVLElR9BRaE9F62BopysASyc4nM3uwhSW7FFB9nlWAA== -esbuild@^0.7.21: - version "0.7.22" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.7.22.tgz#9149b903f8128b7c45a754046c24199d76bbe08e" - integrity sha512-B43SYg8LGWYTCv9Gs0RnuLNwjzpuWOoCaZHTWEDEf5AfrnuDMerPVMdCEu7xOdhFvQ+UqfP2MGU9lxEy0JzccA== +esbuild@^0.8.12: + version "0.8.16" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.16.tgz#8ae34b15d938e8b8b5ac2459414fe3e7fd7dd6b2" + integrity sha512-HMvPNxDIhEGO/YUh8oO8oxQ1g+ttWz2anUF7NJmQglj2XfJS8zd8mP0Sb2y+jE1SVk3UjD/rYhdsEOFULN9/xw== escape-html@^1.0.3: version "1.0.3" @@ -1802,10 +1882,10 @@ rollup-plugin-terser@^7.0.2: serialize-javascript "^4.0.0" terser "^5.0.0" -rollup-plugin-vue@^6.0.0-beta.10: - version "6.0.0-beta.10" - resolved "https://registry.yarnpkg.com/rollup-plugin-vue/-/rollup-plugin-vue-6.0.0-beta.10.tgz#66d9b9a8dd2d085267d1cc398ea0113360879ac1" - integrity sha512-8TZJmROiSRjWoHRR6id0/ktOBOUGuI302xDBq4YBiA/tnnXdoY3oFGtvRWzT5ldX0jTJ8QX40rrJOw2SvcWwxQ== +rollup-plugin-vue@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-vue/-/rollup-plugin-vue-6.0.0.tgz#e379e93e5ae9a8648522f698be2e452e8672aaf2" + integrity sha512-oVvUd84d5u73M2HYM3XsMDLtZRIA/tw2U0dmHlXU2UWP5JARYHzh/U9vcxaN/x/9MrepY7VH3pHFeOhrWpxs/Q== dependencies: debug "^4.1.1" hash-sum "^2.0.0" @@ -1916,7 +1996,7 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@~0.7.2: +source-map@^0.7.3, source-map@~0.7.2: version "0.7.3" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== @@ -2049,40 +2129,41 @@ vary@^1.1.2: resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= -vite-ssr@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/vite-ssr/-/vite-ssr-0.0.6.tgz#5f832a12d04943a1c673b50d80007bf7ecde0b3b" - integrity sha512-L8w9oppkDO7FAlJJJlgnRSbshKpuRgP7og1AQzxW5gii14b5QS4BQybVzO+EVzbcoyhyIzhHowHkL4hvlEXANw== +vite-ssr@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/vite-ssr/-/vite-ssr-0.0.7.tgz#27732afce22ac8433cd296f67f11b3d92287eff2" + integrity sha512-liNePmu4pExPKDgMGLkC/U0cBRAkVALSwm0A9+A4LjhXK3Rj3Wyawun+kG6TnP2VD94Aercqp/uuMMzacMFcYw== dependencies: "@rollup/plugin-replace" "^2.3.3" - "@vue/compiler-sfc" "^3.0.0" "@vue/server-renderer" "^3.0.0" merge-options "^3.0.3" -vite@^1.0.0-rc.9: - version "1.0.0-rc.9" - resolved "https://registry.yarnpkg.com/vite/-/vite-1.0.0-rc.9.tgz#63621a39cf36fe9a6dccafdb11360a5ebbdb2663" - integrity sha512-u0PT2sKMes2RtE5rZsLY0nFm6kEmce7IhVRWKFXmrsjn0MBOCNEi+S6iNnJDmsj1nzvU2dMZ5MHhFyXIqTgjzA== +vite@^1.0.0-rc.13: + version "1.0.0-rc.13" + resolved "https://registry.yarnpkg.com/vite/-/vite-1.0.0-rc.13.tgz#0e0b3b6138998a1d0c02459908a6c4fb2f294727" + integrity sha512-hLfTbhNPDhwXMCAWR6s6C79G/O8Is0MbslglgoHSQsRby+KnqHgtHChCVBHFeV2oZBV/3xhHhnfm94BDPFe8Ww== dependencies: - "@babel/parser" "^7.12.3" + "@babel/parser" "^7.12.7" "@koa/cors" "^3.1.0" - "@rollup/plugin-commonjs" "^15.1.0" + "@rollup/plugin-commonjs" "^16.0.0" "@rollup/plugin-json" "^4.1.0" - "@rollup/plugin-node-resolve" "^9.0.0" - "@rollup/pluginutils" "^4.0.0" + "@rollup/plugin-node-resolve" "^10.0.0" + "@rollup/pluginutils" "^4.1.0" + "@types/http-proxy" "^1.17.4" "@types/koa" "^2.11.4" "@types/lru-cache" "^5.1.0" - "@vue/compiler-dom" "^3.0.2" - "@vue/compiler-sfc" "^3.0.2" + "@vue/compiler-dom" "^3.0.3" + "@vue/compiler-sfc" "^3.0.3" brotli-size "^4.0.0" + cac "^6.6.1" chalk "^4.1.0" chokidar "^3.4.2" clean-css "^4.2.3" - debug "^4.1.1" + debug "^4.3.1" dotenv "^8.2.0" dotenv-expand "^5.1.0" es-module-lexer "^0.3.25" - esbuild "^0.7.21" + esbuild "^0.8.12" etag "^1.8.1" execa "^4.0.3" fs-extra "^9.0.1" @@ -2110,11 +2191,12 @@ vite@^1.0.0-rc.9: rollup "^2.32.1" rollup-plugin-dynamic-import-variables "^1.1.0" rollup-plugin-terser "^7.0.2" - rollup-plugin-vue "^6.0.0-beta.10" + rollup-plugin-vue "^6.0.0" rollup-plugin-web-worker-loader "^1.3.1" selfsigned "^1.10.8" slash "^3.0.0" - vue "^3.0.2" + source-map "^0.7.3" + vue "^3.0.3" ws "^7.3.1" vitedge@../core: @@ -2124,14 +2206,14 @@ vitedge@../core: "@rollup/plugin-virtual" "^2.0.3" fast-glob "^3.2.4" rollup "^2.33.1" - vite-ssr "^0.0.6" + vite-ssr "^0.0.7" vue-router@^4.0.0-rc.1: version "4.0.0-rc.1" resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.0.0-rc.1.tgz#42f41315849163a1243886c9aa6d7c14f24fd003" integrity sha512-N3SSOIiRFo1/D6EkHGuahUSuyDvFhKizN5zVXkALX7wv0hYYndV49KwzRF5lKsAIt+OlDl7y+sNmwNewb7a4iw== -vue@^3.0.0, vue@^3.0.2: +vue@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.2.tgz#9d5b7b2983f35e64a34d13c7c9d6831239feca3c" integrity sha512-ciKFjutKRs+2Vbvgrist1oDd5wZQqtOel/K//ku54zLbf8tcTV+XbyAfanTHcTkML9CUj09vnC+y+5uaOz2/9g== @@ -2140,6 +2222,15 @@ vue@^3.0.0, vue@^3.0.2: "@vue/runtime-dom" "3.0.2" "@vue/shared" "3.0.2" +vue@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.3.tgz#ad94a475e6ebbf3904673b6a0ae46e47b957bd72" + integrity sha512-BZG5meD5vLWdvfnRL5WqfDy+cnXO1X/SweModGUna78bdFPZW6+ZO1tU9p0acrskX3DKFcfSp2s4SZnMjABx6w== + dependencies: + "@vue/compiler-dom" "3.0.3" + "@vue/runtime-dom" "3.0.3" + "@vue/shared" "3.0.3" + wcwidth@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"