From 54a67e6c6063ffde8bcfeba51a8587dac9d3d760 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 24 Jul 2022 09:52:38 -0400 Subject: [PATCH] chore(deps): update dependency vite to v3 (master) (#1444) * chore(deps): update actions/checkout action to v3 (#1431) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency ioredis to v5.2.2 (#1450) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Replace cross-undici-fetch with @whatwg-node/fetch * chore(deps): update dependency vite to v3 * Fix GraphiQL build * Go Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Arda TANRIKULU --- examples/sveltekit/__tests__/test.ts | 4 ++-- examples/sveltekit/package.json | 2 +- packages/graphiql/index.html | 4 +++- packages/graphiql/package.json | 2 +- packages/graphiql/vite.config.ts | 4 ++++ .../scripts/yoga-bundle-string.mjs | 2 +- packages/render-graphiql/src/index.ts | 4 ++-- yarn.lock | 24 +++++++++---------- 8 files changed, 26 insertions(+), 20 deletions(-) diff --git a/examples/sveltekit/__tests__/test.ts b/examples/sveltekit/__tests__/test.ts index 3304a421b1..c33e7bf293 100644 --- a/examples/sveltekit/__tests__/test.ts +++ b/examples/sveltekit/__tests__/test.ts @@ -17,7 +17,7 @@ let toSkip = false; describe('SvelteKit integration', () => { beforeAll(async () => { - console.time('Setup SvelteKit tests'); + // console.time('Setup SvelteKit tests'); const nodeVersion = execSync('node -v').toString(); if (nodeVersion.includes('v12')) { @@ -49,7 +49,7 @@ describe('SvelteKit integration', () => { } // How long it took? - console.timeEnd('Setup SvelteKit tests'); + // console.timeEnd('Setup SvelteKit tests'); }, timings.setup.total); beforeEach(async () => { diff --git a/examples/sveltekit/package.json b/examples/sveltekit/package.json index 96321ff62f..31c11a7f01 100644 --- a/examples/sveltekit/package.json +++ b/examples/sveltekit/package.json @@ -32,7 +32,7 @@ "svelte-preprocess": "4.10.7", "tslib": "2.4.0", "typescript": "4.7.4", - "vite": "2.9.14" + "vite": "3.0.2" }, "dependencies": { "@envelop/graphql-jit": "4.4.0", diff --git a/packages/graphiql/index.html b/packages/graphiql/index.html index 1a8691044b..fbb697ec93 100644 --- a/packages/graphiql/index.html +++ b/packages/graphiql/index.html @@ -21,7 +21,9 @@ diff --git a/packages/graphiql/package.json b/packages/graphiql/package.json index d6f591b13c..172247eac3 100644 --- a/packages/graphiql/package.json +++ b/packages/graphiql/package.json @@ -25,7 +25,7 @@ "devDependencies": { "@types/react": "17.0.39", "@vitejs/plugin-react": "1.3.2", - "vite": "2.9.14" + "vite": "3.0.2" }, "dependencies": { "@graphql-tools/url-loader": "7.13.0", diff --git a/packages/graphiql/vite.config.ts b/packages/graphiql/vite.config.ts index a029a276d2..5e5fb964db 100644 --- a/packages/graphiql/vite.config.ts +++ b/packages/graphiql/vite.config.ts @@ -11,6 +11,9 @@ export default defineConfig({ '/graphql': 'http://localhost:4000', }, }, + define: { + 'process.env.NODE_ENV': '"production"', + }, build: { lib: { entry: path.resolve(__dirname, 'src', 'bundle.tsx'), @@ -20,6 +23,7 @@ export default defineConfig({ rollupOptions: { output: { /** prevent code-splitting */ + inlineDynamicImports: false, manualChunks: () => '_.js', }, }, diff --git a/packages/render-graphiql/scripts/yoga-bundle-string.mjs b/packages/render-graphiql/scripts/yoga-bundle-string.mjs index 95289412b7..194b2ac272 100644 --- a/packages/render-graphiql/scripts/yoga-bundle-string.mjs +++ b/packages/render-graphiql/scripts/yoga-bundle-string.mjs @@ -4,7 +4,7 @@ import { fileURLToPath } from 'url' const directoryName = path.dirname(fileURLToPath(import.meta.url)) const inputPath = path.resolve(directoryName, '..', '..', 'graphiql', 'dist') -const jsFile = path.resolve(inputPath, 'yoga-graphiql.es.js') +const jsFile = path.resolve(inputPath, 'yoga-graphiql.umd.js') const cssFile = path.resolve(inputPath, 'style.css') const outFile = path.resolve(directoryName, '..', 'src', 'graphiql.ts') diff --git a/packages/render-graphiql/src/index.ts b/packages/render-graphiql/src/index.ts index fa2aca3a9d..9db0daa4bc 100644 --- a/packages/render-graphiql/src/index.ts +++ b/packages/render-graphiql/src/index.ts @@ -16,9 +16,9 @@ export const renderGraphiQL = (opts?: GraphiQLOptions) => /* HTML */ `
-