From 2396724f6a70e21eb9fc7dc90e4afdc810c907f0 Mon Sep 17 00:00:00 2001 From: Dillon Kearns Date: Sat, 6 May 2023 09:24:03 -0700 Subject: [PATCH] Prevent vite warning message. --- examples/docs/package-lock.json | 65 +++++++++++++++++---------------- generator/src/build.js | 3 ++ generator/src/dev-server.js | 7 ++++ 3 files changed, 43 insertions(+), 32 deletions(-) diff --git a/examples/docs/package-lock.json b/examples/docs/package-lock.json index dab2161f..f68dfeb6 100644 --- a/examples/docs/package-lock.json +++ b/examples/docs/package-lock.json @@ -24,32 +24,33 @@ } }, "../..": { - "version": "3.0.0-beta.33", + "name": "elm-pages", + "version": "3.0.0-beta.36", "dev": true, "license": "BSD-3-Clause", "dependencies": { "busboy": "^1.6.0", "chokidar": "^3.5.3", - "commander": "^10.0.0", + "commander": "^10.0.1", "connect": "^3.7.0", "cookie-signature": "^1.2.1", "cross-spawn": "7.0.3", "devcert": "^1.2.2", "elm-doc-preview": "^5.0.5", "elm-hot": "^1.1.6", - "esbuild": "^0.17.12", + "esbuild": "^0.17.18", "fs-extra": "^11.1.1", - "globby": "13.1.3", + "globby": "13.1.4", "gray-matter": "^4.0.3", "jsesc": "^3.0.2", "kleur": "^4.1.5", - "make-fetch-happen": "^11.0.3", - "memfs": "^3.4.13", + "make-fetch-happen": "^11.1.1", + "memfs": "^3.5.1", "micromatch": "^4.0.5", "serve-static": "^1.15.0", - "terser": "^5.16.8", - "vite": "^4.2.1", - "which": "^3.0.0" + "terser": "^5.17.1", + "vite": "^4.3.5", + "which": "^3.0.1" }, "bin": { "elm-pages": "generator/src/cli.js" @@ -59,19 +60,19 @@ "@types/fs-extra": "^11.0.1", "@types/make-fetch-happen": "^10.0.1", "@types/micromatch": "^4.0.2", - "@types/node": "^18.15.7", + "@types/node": "^20.1.0", "@types/serve-static": "^1.15.1", - "cypress": "^12.8.1", + "cypress": "^12.11.0", "elm-codegen": "^0.3.0", "elm-optimize-level-2": "^0.3.5", - "elm-review": "^2.9.2", - "elm-test": "^0.19.1-revision11", - "elm-tooling": "^1.13.1", + "elm-review": "^2.10.2", + "elm-test": "^0.19.1-revision12", + "elm-tooling": "^1.14.0", "elm-verify-examples": "^5.2.0", "elmi-to-json": "^1.4.3", - "typescript": "^5.0.2", - "vite": "^4.2.1", - "vitest": "^0.29.7" + "typescript": "^5.0.4", + "vite": "^4.3.5", + "vitest": "^0.31.0" } }, "node_modules/@sindresorhus/is": { @@ -3350,40 +3351,40 @@ "@types/fs-extra": "^11.0.1", "@types/make-fetch-happen": "^10.0.1", "@types/micromatch": "^4.0.2", - "@types/node": "^18.15.7", + "@types/node": "^20.1.0", "@types/serve-static": "^1.15.1", "busboy": "^1.6.0", "chokidar": "^3.5.3", - "commander": "^10.0.0", + "commander": "^10.0.1", "connect": "^3.7.0", "cookie-signature": "^1.2.1", "cross-spawn": "7.0.3", - "cypress": "^12.8.1", + "cypress": "^12.11.0", "devcert": "^1.2.2", "elm-codegen": "^0.3.0", "elm-doc-preview": "^5.0.5", "elm-hot": "^1.1.6", "elm-optimize-level-2": "^0.3.5", - "elm-review": "^2.9.2", - "elm-test": "^0.19.1-revision11", - "elm-tooling": "^1.13.1", + "elm-review": "^2.10.2", + "elm-test": "^0.19.1-revision12", + "elm-tooling": "^1.14.0", "elm-verify-examples": "^5.2.0", "elmi-to-json": "^1.4.3", - "esbuild": "^0.17.12", + "esbuild": "^0.17.18", "fs-extra": "^11.1.1", - "globby": "13.1.3", + "globby": "13.1.4", "gray-matter": "^4.0.3", "jsesc": "^3.0.2", "kleur": "^4.1.5", - "make-fetch-happen": "^11.0.3", - "memfs": "^3.4.13", + "make-fetch-happen": "^11.1.1", + "memfs": "^3.5.1", "micromatch": "^4.0.5", "serve-static": "^1.15.0", - "terser": "^5.16.8", - "typescript": "^5.0.2", - "vite": "^4.2.1", - "vitest": "^0.29.7", - "which": "^3.0.0" + "terser": "^5.17.1", + "typescript": "^5.0.4", + "vite": "^4.3.5", + "vitest": "^0.31.0", + "which": "^3.0.1" } }, "elm-review": { diff --git a/generator/src/build.js b/generator/src/build.js index a28a7318..fc0473f8 100755 --- a/generator/src/build.js +++ b/generator/src/build.js @@ -96,6 +96,9 @@ export async function run(options) { input: "elm-stuff/elm-pages/index.html", }, }, + optimizeDeps: { + include: [], + }, }, config.vite || {} ); diff --git a/generator/src/dev-server.js b/generator/src/dev-server.js index d10dcc12..b3fc1119 100644 --- a/generator/src/dev-server.js +++ b/generator/src/dev-server.js @@ -173,6 +173,13 @@ export async function start(options) { configFile: false, root: process.cwd(), base: options.base, + /* + Using explicit optimizeDeps.include prevents the following Vite warning message: + (!) Could not auto-determine entry point from rollupOptions or html files and there are no explicit optimizeDeps.include patterns. Skipping dependency pre-bundling. + */ + optimizeDeps: { + include: [], + }, }, config.vite