From 4e3e0b12bfb4c50e65c0655a1ca1f7e7514b0f16 Mon Sep 17 00:00:00 2001 From: taylorotwell <463230+taylorotwell@users.noreply.github.com> Date: Tue, 21 Jan 2025 23:28:17 +0000 Subject: [PATCH 1/5] Update CHANGELOG --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 187f216..b350a66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Release Notes -## [Unreleased](https://github.com/laravel/vite-plugin/compare/v1.1.1...1.x) +## [Unreleased](https://github.com/laravel/vite-plugin/compare/v1.2.0...1.x) + +## [v1.2.0](https://github.com/laravel/vite-plugin/compare/v1.1.1...v1.2.0) - 2025-01-21 + +* [1.x] Fix Invalid URL issue with Vite 6.0.9 by [@batinmustu](https://github.com/batinmustu) in https://github.com/laravel/vite-plugin/pull/317 +* [1.x] Add default CORS origins by [@timacdonald](https://github.com/timacdonald) in https://github.com/laravel/vite-plugin/pull/318 ## [v1.1.1](https://github.com/laravel/vite-plugin/compare/v1.1.0...v1.1.1) - 2024-12-03 From 6dbbe2591bbef991542c55c9bbae9bfebdd2e4a6 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 12 Feb 2025 09:38:32 +0800 Subject: [PATCH 2/5] chore: Update `update-changelog.yml` --- .github/workflows/update-changelog.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index 1625bda..ebda620 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -4,6 +4,10 @@ on: release: types: [released] +permissions: {} + jobs: update: + permissions: + contents: write uses: laravel/.github/.github/workflows/update-changelog.yml@main From c0c82ca4ee19f6e71e66f870e4e09c835fd9dfc7 Mon Sep 17 00:00:00 2001 From: Tim MacDonald Date: Wed, 19 Feb 2025 08:51:58 +1100 Subject: [PATCH 3/5] Comment on duplicated regex --- src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index c0daeeb..45a3fe4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -154,9 +154,9 @@ function resolveLaravelPlugin(pluginConfig: Required): LaravelPlug origin: userConfig.server?.origin ?? 'http://__laravel_vite_placeholder__.test', cors: userConfig.server?.cors ?? { origin: userConfig.server?.origin ?? [ - /^https?:\/\/(?:(?:[^:]+\.)?localhost|127\.0\.0\.1|\[::1\])(?::\d+)?$/, - ...(env.APP_URL ? [env.APP_URL] : []), // * (APP_URL="http://my-app.tld") - /^https?:\/\/.*\.test(:\d+)?$/, // Valet / Herd (SCHEME://*.test:PORT) + /^https?:\/\/(?:(?:[^:]+\.)?localhost|127\.0\.0\.1|\[::1\])(?::\d+)?$/, // Copied from Vite itself. We can import this once we drop 5.0 support and require Vite 6.1+. Source: https://github.com/vitejs/vite/blob/0c854645bd17960abbe8f01b602d1a1da1a2b9fd/packages/vite/src/node/constants.ts#L200-L201 + ...(env.APP_URL ? [env.APP_URL] : []), // * (APP_URL="http://my-app.tld") + /^https?:\/\/.*\.test(:\d+)?$/, // Valet / Herd (SCHEME://*.test:PORT) ], }, ...(process.env.LARAVEL_SAIL ? { From aa697cd99f0bab5fbf5bb9246991d8f7d6be824e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0?= Date: Fri, 30 May 2025 22:39:53 +0900 Subject: [PATCH 4/5] Use rollup types from Vite (#325) * Use rollup types from Vite * fixup --- src/index.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index 45a3fe4..ee45b92 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,15 +4,14 @@ import os from 'os' import { fileURLToPath } from 'url' import path from 'path' import colors from 'picocolors' -import { Plugin, loadEnv, UserConfig, ConfigEnv, ResolvedConfig, SSROptions, PluginOption } from 'vite' +import { Plugin, loadEnv, UserConfig, ConfigEnv, ResolvedConfig, SSROptions, PluginOption, Rollup } from 'vite' import fullReload, { Config as FullReloadConfig } from 'vite-plugin-full-reload' -import { InputOption } from "rollup" interface PluginConfig { /** * The path or paths of the entry points to compile. */ - input: InputOption + input: Rollup.InputOption /** * Laravel's public directory. @@ -38,7 +37,7 @@ interface PluginConfig { /** * The path of the SSR entry point. */ - ssr?: InputOption + ssr?: Rollup.InputOption /** * The directory where the SSR bundle should be written. @@ -376,7 +375,7 @@ function resolveBase(config: Required, assetUrl: string): string { /** * Resolve the Vite input path from the configuration. */ -function resolveInput(config: Required, ssr: boolean): InputOption|undefined { +function resolveInput(config: Required, ssr: boolean): Rollup.InputOption|undefined { if (ssr) { return config.ssr } From 9d835fea5099f8bcba7b684769514d8eac835d43 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 3 Jun 2025 09:20:34 -0500 Subject: [PATCH 5/5] version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index aaeadba..a05fea8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "laravel-vite-plugin", - "version": "1.2.0", + "version": "1.3.0", "description": "Laravel plugin for Vite.", "keywords": [ "laravel",