From 9d33795827a5699f9eb25fd4b86b96afedd3dac8 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sun, 18 May 2025 22:11:39 +0200 Subject: [PATCH 1/6] Fix Vite adding suffix to app scripts --- packages/vite-plugin/dist/index.js | 28 ++++++++++++++++++++++------ packages/vite-plugin/src/index.ts | 29 ++++++++++++++++++++++------- 2 files changed, 44 insertions(+), 13 deletions(-) diff --git a/packages/vite-plugin/dist/index.js b/packages/vite-plugin/dist/index.js index ebc9c5efc79..022c32f0212 100644 --- a/packages/vite-plugin/dist/index.js +++ b/packages/vite-plugin/dist/index.js @@ -56,18 +56,22 @@ export default function hydePlugin(options = {}) { config(config, { command }) { // Only modify build configuration if (command === 'build') { - // Process input files - only include app.js if it has content - const resolvedInput = []; + // Process input files - use named keys to prevent filename collisions + const resolvedInput = {}; for (const entry of input) { const resolvedPath = path.resolve(process.cwd(), entry); // Only include app.js if it has actual content if (entry.endsWith('app.js')) { if (hasJavaScriptContent(resolvedPath) && fileExists(resolvedPath)) { - resolvedInput.push(resolvedPath); + resolvedInput.js = resolvedPath; } } + else if (entry.endsWith('app.css') && fileExists(resolvedPath)) { + resolvedInput.css = resolvedPath; + } else if (fileExists(resolvedPath)) { - resolvedInput.push(resolvedPath); + const basename = path.basename(entry, path.extname(entry)); + resolvedInput[basename] = resolvedPath; } } return { @@ -77,9 +81,21 @@ export default function hydePlugin(options = {}) { rollupOptions: { input: resolvedInput, output: { - entryFileNames: '[name].js', + entryFileNames: (chunkInfo) => { + // Use app.js for the JS entry point + if (chunkInfo.name === 'js') { + return 'app.js'; + } + return '[name].js'; + }, chunkFileNames: '[name].js', - assetFileNames: '[name].[ext]' + assetFileNames: (assetInfo) => { + // Use app.css for CSS assets + if (assetInfo.name && assetInfo.name.endsWith('.css')) { + return 'app.css'; + } + return '[name].[ext]'; + } } } } diff --git a/packages/vite-plugin/src/index.ts b/packages/vite-plugin/src/index.ts index c51bf900f47..86621127bba 100644 --- a/packages/vite-plugin/src/index.ts +++ b/packages/vite-plugin/src/index.ts @@ -89,19 +89,22 @@ export default function hydePlugin(options: HydePluginOptions = {}): Plugin { config(config, { command }) { // Only modify build configuration if (command === 'build') { - // Process input files - only include app.js if it has content - const resolvedInput = []; - + // Process input files - use named keys to prevent filename collisions + const resolvedInput: Record = {}; + for (const entry of input) { const resolvedPath = path.resolve(process.cwd(), entry); // Only include app.js if it has actual content if (entry.endsWith('app.js')) { if (hasJavaScriptContent(resolvedPath) && fileExists(resolvedPath)) { - resolvedInput.push(resolvedPath); + resolvedInput.js = resolvedPath; } + } else if (entry.endsWith('app.css') && fileExists(resolvedPath)) { + resolvedInput.css = resolvedPath; } else if (fileExists(resolvedPath)) { - resolvedInput.push(resolvedPath); + const basename = path.basename(entry, path.extname(entry)); + resolvedInput[basename] = resolvedPath; } } @@ -112,9 +115,21 @@ export default function hydePlugin(options: HydePluginOptions = {}): Plugin { rollupOptions: { input: resolvedInput, output: { - entryFileNames: '[name].js', + entryFileNames: (chunkInfo) => { + // Use app.js for the JS entry point + if (chunkInfo.name === 'js') { + return 'app.js'; + } + return '[name].js'; + }, chunkFileNames: '[name].js', - assetFileNames: '[name].[ext]' + assetFileNames: (assetInfo) => { + // Use app.css for CSS assets + if (assetInfo.name && assetInfo.name.endsWith('.css')) { + return 'app.css'; + } + return '[name].[ext]'; + } } } } From 2ce224d5e204bf059ebe44b0417e9efa65fe7ef7 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sun, 18 May 2025 23:01:47 +0200 Subject: [PATCH 2/6] Support Vite Glob patterns --- packages/vite-plugin/dist/index.d.ts | 1 + packages/vite-plugin/dist/index.js | 119 +++++++++++++++++++++-- packages/vite-plugin/src/index.ts | 135 +++++++++++++++++++++++++-- 3 files changed, 242 insertions(+), 13 deletions(-) diff --git a/packages/vite-plugin/dist/index.d.ts b/packages/vite-plugin/dist/index.d.ts index 17b46bbf6b2..288f86a9b7c 100644 --- a/packages/vite-plugin/dist/index.d.ts +++ b/packages/vite-plugin/dist/index.d.ts @@ -2,6 +2,7 @@ import { Plugin } from 'vite'; export interface HydePluginOptions { /** * Asset entry points to process + * Supports glob patterns like 'resources/assets/*.js' * * @default ['resources/assets/app.css', 'resources/assets/app.js'] */ diff --git a/packages/vite-plugin/dist/index.js b/packages/vite-plugin/dist/index.js index 022c32f0212..bee215c1041 100644 --- a/packages/vite-plugin/dist/index.js +++ b/packages/vite-plugin/dist/index.js @@ -44,6 +44,94 @@ function hasJavaScriptContent(filePath) { return false; } } +/** + * Check if a string contains glob patterns + */ +function isGlobPattern(pattern) { + return pattern.includes('*') || pattern.includes('?') || pattern.includes('['); +} +/** + * Expand a glob pattern to match files in the filesystem + */ +function expandGlobPattern(pattern, base = process.cwd()) { + // Normalize the pattern to use proper path separators + const normalizedPattern = path.normalize(pattern); + // Get the directory part before any glob syntax + const parts = normalizedPattern.split(/[\\/]/); + let globIndex = parts.findIndex(part => isGlobPattern(part)); + if (globIndex === -1) { + // No glob pattern found + return fileExists(path.resolve(base, normalizedPattern)) ? [normalizedPattern] : []; + } + // Build the base directory path (before the glob pattern) + const baseDir = path.join(base, ...parts.slice(0, globIndex)); + // The remaining pattern parts (includes and after the glob) + const remainingPattern = parts.slice(globIndex).join(path.sep); + // Start with the baseDir + let currentResults = [baseDir]; + let allResults = []; + // Process each directory level that contains glob patterns + for (let i = globIndex; i < parts.length; i++) { + const nextResults = []; + const part = parts[i]; + // For each current directory, get matching entries + for (const dir of currentResults) { + if (!fs.existsSync(dir)) + continue; + try { + const entries = fs.readdirSync(dir, { withFileTypes: true }); + for (const entry of entries) { + const fullPath = path.join(dir, entry.name); + // Check if this entry matches the current pattern part + if (matchGlobPattern(entry.name, part)) { + if (i === parts.length - 1) { + // Last part of the pattern + if (entry.isFile()) { + allResults.push(path.relative(base, fullPath)); + } + } + else if (entry.isDirectory()) { + nextResults.push(fullPath); + } + } + } + } + catch (error) { + // Skip directories we can't read + } + } + currentResults = nextResults; + } + return allResults; +} +/** + * Match a filename against a simple glob pattern + */ +function matchGlobPattern(filename, pattern) { + // Convert glob pattern to regex + const regexPattern = pattern + .replace(/\./g, '\\.') // Escape dots + .replace(/\*/g, '.*') // * matches any sequence + .replace(/\?/g, '.') // ? matches a single character + .replace(/\[([^\]]+)\]/g, (_, chars) => `[${chars}]`); // character classes + const regex = new RegExp(`^${regexPattern}$`); + return regex.test(filename); +} +/** + * Expand all glob patterns in an array of input paths + */ +function expandGlobPatterns(patterns) { + const results = []; + for (const pattern of patterns) { + if (isGlobPattern(pattern)) { + results.push(...expandGlobPattern(pattern)); + } + else { + results.push(pattern); + } + } + return results; +} /** * HydePHP Vite plugin for realtime compiler integration */ @@ -58,16 +146,35 @@ export default function hydePlugin(options = {}) { if (command === 'build') { // Process input files - use named keys to prevent filename collisions const resolvedInput = {}; - for (const entry of input) { + // Expand any glob patterns in the input array + const expandedInput = expandGlobPatterns(input); + for (const entry of expandedInput) { const resolvedPath = path.resolve(process.cwd(), entry); - // Only include app.js if it has actual content - if (entry.endsWith('app.js')) { + // Only include JS files if they have actual content + if (entry.endsWith('.js')) { if (hasJavaScriptContent(resolvedPath) && fileExists(resolvedPath)) { - resolvedInput.js = resolvedPath; + // Use special key for app.js, otherwise use basename + if (entry.endsWith('app.js')) { + resolvedInput.js = resolvedPath; + } + else { + const basename = path.basename(entry, path.extname(entry)); + resolvedInput[basename] = resolvedPath; + } } } - else if (entry.endsWith('app.css') && fileExists(resolvedPath)) { - resolvedInput.css = resolvedPath; + else if (entry.endsWith('.css')) { + // For CSS files, include them if they exist + if (fileExists(resolvedPath)) { + // Use special key for app.css, otherwise use basename + if (entry.endsWith('app.css')) { + resolvedInput.css = resolvedPath; + } + else { + const basename = path.basename(entry, path.extname(entry)); + resolvedInput[basename] = resolvedPath; + } + } } else if (fileExists(resolvedPath)) { const basename = path.basename(entry, path.extname(entry)); diff --git a/packages/vite-plugin/src/index.ts b/packages/vite-plugin/src/index.ts index 86621127bba..6d7e408f695 100644 --- a/packages/vite-plugin/src/index.ts +++ b/packages/vite-plugin/src/index.ts @@ -9,6 +9,7 @@ const HOT_FILE_PATH = 'app/storage/framework/runtime/vite.hot'; export interface HydePluginOptions { /** * Asset entry points to process + * Supports glob patterns like 'resources/assets/*.js' * * @default ['resources/assets/app.css', 'resources/assets/app.js'] */ @@ -70,6 +71,108 @@ function hasJavaScriptContent(filePath: string): boolean { } } +/** + * Check if a string contains glob patterns + */ +function isGlobPattern(pattern: string): boolean { + return pattern.includes('*') || pattern.includes('?') || pattern.includes('['); +} + +/** + * Expand a glob pattern to match files in the filesystem + */ +function expandGlobPattern(pattern: string, base = process.cwd()): string[] { + // Normalize the pattern to use proper path separators + const normalizedPattern = path.normalize(pattern); + + // Get the directory part before any glob syntax + const parts = normalizedPattern.split(/[\\/]/); + let globIndex = parts.findIndex(part => isGlobPattern(part)); + if (globIndex === -1) { + // No glob pattern found + return fileExists(path.resolve(base, normalizedPattern)) ? [normalizedPattern] : []; + } + + // Build the base directory path (before the glob pattern) + const baseDir = path.join(base, ...parts.slice(0, globIndex)); + + // The remaining pattern parts (includes and after the glob) + const remainingPattern = parts.slice(globIndex).join(path.sep); + + // Start with the baseDir + let currentResults: string[] = [baseDir]; + let allResults: string[] = []; + + // Process each directory level that contains glob patterns + for (let i = globIndex; i < parts.length; i++) { + const nextResults: string[] = []; + const part = parts[i]; + + // For each current directory, get matching entries + for (const dir of currentResults) { + if (!fs.existsSync(dir)) continue; + + try { + const entries = fs.readdirSync(dir, { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = path.join(dir, entry.name); + + // Check if this entry matches the current pattern part + if (matchGlobPattern(entry.name, part)) { + if (i === parts.length - 1) { + // Last part of the pattern + if (entry.isFile()) { + allResults.push(path.relative(base, fullPath)); + } + } else if (entry.isDirectory()) { + nextResults.push(fullPath); + } + } + } + } catch (error) { + // Skip directories we can't read + } + } + + currentResults = nextResults; + } + + return allResults; +} + +/** + * Match a filename against a simple glob pattern + */ +function matchGlobPattern(filename: string, pattern: string): boolean { + // Convert glob pattern to regex + const regexPattern = pattern + .replace(/\./g, '\\.') // Escape dots + .replace(/\*/g, '.*') // * matches any sequence + .replace(/\?/g, '.') // ? matches a single character + .replace(/\[([^\]]+)\]/g, (_, chars) => `[${chars}]`); // character classes + + const regex = new RegExp(`^${regexPattern}$`); + return regex.test(filename); +} + +/** + * Expand all glob patterns in an array of input paths + */ +function expandGlobPatterns(patterns: string[]): string[] { + const results: string[] = []; + + for (const pattern of patterns) { + if (isGlobPattern(pattern)) { + results.push(...expandGlobPattern(pattern)); + } else { + results.push(pattern); + } + } + + return results; +} + /** * HydePHP Vite plugin for realtime compiler integration */ @@ -92,16 +195,34 @@ export default function hydePlugin(options: HydePluginOptions = {}): Plugin { // Process input files - use named keys to prevent filename collisions const resolvedInput: Record = {}; - for (const entry of input) { + // Expand any glob patterns in the input array + const expandedInput = expandGlobPatterns(input); + + for (const entry of expandedInput) { const resolvedPath = path.resolve(process.cwd(), entry); - // Only include app.js if it has actual content - if (entry.endsWith('app.js')) { + // Only include JS files if they have actual content + if (entry.endsWith('.js')) { if (hasJavaScriptContent(resolvedPath) && fileExists(resolvedPath)) { - resolvedInput.js = resolvedPath; + // Use special key for app.js, otherwise use basename + if (entry.endsWith('app.js')) { + resolvedInput.js = resolvedPath; + } else { + const basename = path.basename(entry, path.extname(entry)); + resolvedInput[basename] = resolvedPath; + } + } + } else if (entry.endsWith('.css')) { + // For CSS files, include them if they exist + if (fileExists(resolvedPath)) { + // Use special key for app.css, otherwise use basename + if (entry.endsWith('app.css')) { + resolvedInput.css = resolvedPath; + } else { + const basename = path.basename(entry, path.extname(entry)); + resolvedInput[basename] = resolvedPath; + } } - } else if (entry.endsWith('app.css') && fileExists(resolvedPath)) { - resolvedInput.css = resolvedPath; } else if (fileExists(resolvedPath)) { const basename = path.basename(entry, path.extname(entry)); resolvedInput[basename] = resolvedPath; @@ -186,4 +307,4 @@ export default function hydePlugin(options: HydePluginOptions = {}): Plugin { } } }; -} +} \ No newline at end of file From 1c15161e09f19bbaee737316794c73161450adba Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Tue, 20 May 2025 18:59:21 +0200 Subject: [PATCH 3/6] Revert "Support Vite Glob patterns" This reverts commit 7152646dc534fdb907f84502b00915ea25578c3e. --- packages/vite-plugin/dist/index.d.ts | 1 - packages/vite-plugin/dist/index.js | 119 ++--------------------- packages/vite-plugin/src/index.ts | 135 ++------------------------- 3 files changed, 13 insertions(+), 242 deletions(-) diff --git a/packages/vite-plugin/dist/index.d.ts b/packages/vite-plugin/dist/index.d.ts index 288f86a9b7c..17b46bbf6b2 100644 --- a/packages/vite-plugin/dist/index.d.ts +++ b/packages/vite-plugin/dist/index.d.ts @@ -2,7 +2,6 @@ import { Plugin } from 'vite'; export interface HydePluginOptions { /** * Asset entry points to process - * Supports glob patterns like 'resources/assets/*.js' * * @default ['resources/assets/app.css', 'resources/assets/app.js'] */ diff --git a/packages/vite-plugin/dist/index.js b/packages/vite-plugin/dist/index.js index bee215c1041..022c32f0212 100644 --- a/packages/vite-plugin/dist/index.js +++ b/packages/vite-plugin/dist/index.js @@ -44,94 +44,6 @@ function hasJavaScriptContent(filePath) { return false; } } -/** - * Check if a string contains glob patterns - */ -function isGlobPattern(pattern) { - return pattern.includes('*') || pattern.includes('?') || pattern.includes('['); -} -/** - * Expand a glob pattern to match files in the filesystem - */ -function expandGlobPattern(pattern, base = process.cwd()) { - // Normalize the pattern to use proper path separators - const normalizedPattern = path.normalize(pattern); - // Get the directory part before any glob syntax - const parts = normalizedPattern.split(/[\\/]/); - let globIndex = parts.findIndex(part => isGlobPattern(part)); - if (globIndex === -1) { - // No glob pattern found - return fileExists(path.resolve(base, normalizedPattern)) ? [normalizedPattern] : []; - } - // Build the base directory path (before the glob pattern) - const baseDir = path.join(base, ...parts.slice(0, globIndex)); - // The remaining pattern parts (includes and after the glob) - const remainingPattern = parts.slice(globIndex).join(path.sep); - // Start with the baseDir - let currentResults = [baseDir]; - let allResults = []; - // Process each directory level that contains glob patterns - for (let i = globIndex; i < parts.length; i++) { - const nextResults = []; - const part = parts[i]; - // For each current directory, get matching entries - for (const dir of currentResults) { - if (!fs.existsSync(dir)) - continue; - try { - const entries = fs.readdirSync(dir, { withFileTypes: true }); - for (const entry of entries) { - const fullPath = path.join(dir, entry.name); - // Check if this entry matches the current pattern part - if (matchGlobPattern(entry.name, part)) { - if (i === parts.length - 1) { - // Last part of the pattern - if (entry.isFile()) { - allResults.push(path.relative(base, fullPath)); - } - } - else if (entry.isDirectory()) { - nextResults.push(fullPath); - } - } - } - } - catch (error) { - // Skip directories we can't read - } - } - currentResults = nextResults; - } - return allResults; -} -/** - * Match a filename against a simple glob pattern - */ -function matchGlobPattern(filename, pattern) { - // Convert glob pattern to regex - const regexPattern = pattern - .replace(/\./g, '\\.') // Escape dots - .replace(/\*/g, '.*') // * matches any sequence - .replace(/\?/g, '.') // ? matches a single character - .replace(/\[([^\]]+)\]/g, (_, chars) => `[${chars}]`); // character classes - const regex = new RegExp(`^${regexPattern}$`); - return regex.test(filename); -} -/** - * Expand all glob patterns in an array of input paths - */ -function expandGlobPatterns(patterns) { - const results = []; - for (const pattern of patterns) { - if (isGlobPattern(pattern)) { - results.push(...expandGlobPattern(pattern)); - } - else { - results.push(pattern); - } - } - return results; -} /** * HydePHP Vite plugin for realtime compiler integration */ @@ -146,35 +58,16 @@ export default function hydePlugin(options = {}) { if (command === 'build') { // Process input files - use named keys to prevent filename collisions const resolvedInput = {}; - // Expand any glob patterns in the input array - const expandedInput = expandGlobPatterns(input); - for (const entry of expandedInput) { + for (const entry of input) { const resolvedPath = path.resolve(process.cwd(), entry); - // Only include JS files if they have actual content - if (entry.endsWith('.js')) { + // Only include app.js if it has actual content + if (entry.endsWith('app.js')) { if (hasJavaScriptContent(resolvedPath) && fileExists(resolvedPath)) { - // Use special key for app.js, otherwise use basename - if (entry.endsWith('app.js')) { - resolvedInput.js = resolvedPath; - } - else { - const basename = path.basename(entry, path.extname(entry)); - resolvedInput[basename] = resolvedPath; - } + resolvedInput.js = resolvedPath; } } - else if (entry.endsWith('.css')) { - // For CSS files, include them if they exist - if (fileExists(resolvedPath)) { - // Use special key for app.css, otherwise use basename - if (entry.endsWith('app.css')) { - resolvedInput.css = resolvedPath; - } - else { - const basename = path.basename(entry, path.extname(entry)); - resolvedInput[basename] = resolvedPath; - } - } + else if (entry.endsWith('app.css') && fileExists(resolvedPath)) { + resolvedInput.css = resolvedPath; } else if (fileExists(resolvedPath)) { const basename = path.basename(entry, path.extname(entry)); diff --git a/packages/vite-plugin/src/index.ts b/packages/vite-plugin/src/index.ts index 6d7e408f695..86621127bba 100644 --- a/packages/vite-plugin/src/index.ts +++ b/packages/vite-plugin/src/index.ts @@ -9,7 +9,6 @@ const HOT_FILE_PATH = 'app/storage/framework/runtime/vite.hot'; export interface HydePluginOptions { /** * Asset entry points to process - * Supports glob patterns like 'resources/assets/*.js' * * @default ['resources/assets/app.css', 'resources/assets/app.js'] */ @@ -71,108 +70,6 @@ function hasJavaScriptContent(filePath: string): boolean { } } -/** - * Check if a string contains glob patterns - */ -function isGlobPattern(pattern: string): boolean { - return pattern.includes('*') || pattern.includes('?') || pattern.includes('['); -} - -/** - * Expand a glob pattern to match files in the filesystem - */ -function expandGlobPattern(pattern: string, base = process.cwd()): string[] { - // Normalize the pattern to use proper path separators - const normalizedPattern = path.normalize(pattern); - - // Get the directory part before any glob syntax - const parts = normalizedPattern.split(/[\\/]/); - let globIndex = parts.findIndex(part => isGlobPattern(part)); - if (globIndex === -1) { - // No glob pattern found - return fileExists(path.resolve(base, normalizedPattern)) ? [normalizedPattern] : []; - } - - // Build the base directory path (before the glob pattern) - const baseDir = path.join(base, ...parts.slice(0, globIndex)); - - // The remaining pattern parts (includes and after the glob) - const remainingPattern = parts.slice(globIndex).join(path.sep); - - // Start with the baseDir - let currentResults: string[] = [baseDir]; - let allResults: string[] = []; - - // Process each directory level that contains glob patterns - for (let i = globIndex; i < parts.length; i++) { - const nextResults: string[] = []; - const part = parts[i]; - - // For each current directory, get matching entries - for (const dir of currentResults) { - if (!fs.existsSync(dir)) continue; - - try { - const entries = fs.readdirSync(dir, { withFileTypes: true }); - - for (const entry of entries) { - const fullPath = path.join(dir, entry.name); - - // Check if this entry matches the current pattern part - if (matchGlobPattern(entry.name, part)) { - if (i === parts.length - 1) { - // Last part of the pattern - if (entry.isFile()) { - allResults.push(path.relative(base, fullPath)); - } - } else if (entry.isDirectory()) { - nextResults.push(fullPath); - } - } - } - } catch (error) { - // Skip directories we can't read - } - } - - currentResults = nextResults; - } - - return allResults; -} - -/** - * Match a filename against a simple glob pattern - */ -function matchGlobPattern(filename: string, pattern: string): boolean { - // Convert glob pattern to regex - const regexPattern = pattern - .replace(/\./g, '\\.') // Escape dots - .replace(/\*/g, '.*') // * matches any sequence - .replace(/\?/g, '.') // ? matches a single character - .replace(/\[([^\]]+)\]/g, (_, chars) => `[${chars}]`); // character classes - - const regex = new RegExp(`^${regexPattern}$`); - return regex.test(filename); -} - -/** - * Expand all glob patterns in an array of input paths - */ -function expandGlobPatterns(patterns: string[]): string[] { - const results: string[] = []; - - for (const pattern of patterns) { - if (isGlobPattern(pattern)) { - results.push(...expandGlobPattern(pattern)); - } else { - results.push(pattern); - } - } - - return results; -} - /** * HydePHP Vite plugin for realtime compiler integration */ @@ -195,34 +92,16 @@ export default function hydePlugin(options: HydePluginOptions = {}): Plugin { // Process input files - use named keys to prevent filename collisions const resolvedInput: Record = {}; - // Expand any glob patterns in the input array - const expandedInput = expandGlobPatterns(input); - - for (const entry of expandedInput) { + for (const entry of input) { const resolvedPath = path.resolve(process.cwd(), entry); - // Only include JS files if they have actual content - if (entry.endsWith('.js')) { + // Only include app.js if it has actual content + if (entry.endsWith('app.js')) { if (hasJavaScriptContent(resolvedPath) && fileExists(resolvedPath)) { - // Use special key for app.js, otherwise use basename - if (entry.endsWith('app.js')) { - resolvedInput.js = resolvedPath; - } else { - const basename = path.basename(entry, path.extname(entry)); - resolvedInput[basename] = resolvedPath; - } - } - } else if (entry.endsWith('.css')) { - // For CSS files, include them if they exist - if (fileExists(resolvedPath)) { - // Use special key for app.css, otherwise use basename - if (entry.endsWith('app.css')) { - resolvedInput.css = resolvedPath; - } else { - const basename = path.basename(entry, path.extname(entry)); - resolvedInput[basename] = resolvedPath; - } + resolvedInput.js = resolvedPath; } + } else if (entry.endsWith('app.css') && fileExists(resolvedPath)) { + resolvedInput.css = resolvedPath; } else if (fileExists(resolvedPath)) { const basename = path.basename(entry, path.extname(entry)); resolvedInput[basename] = resolvedPath; @@ -307,4 +186,4 @@ export default function hydePlugin(options: HydePluginOptions = {}): Plugin { } } }; -} \ No newline at end of file +} From 488f025210c70afd0ba0feaba381b4f2a45dd9a5 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Tue, 20 May 2025 19:12:06 +0200 Subject: [PATCH 4/6] Minify the compiled Vite plugin with Terser --- packages/vite-plugin/dist/index.js | 154 +------- packages/vite-plugin/package-lock.json | 513 ++++++++++++++++++------- packages/vite-plugin/package.json | 5 +- 3 files changed, 387 insertions(+), 285 deletions(-) diff --git a/packages/vite-plugin/dist/index.js b/packages/vite-plugin/dist/index.js index 022c32f0212..c421c4e59f9 100644 --- a/packages/vite-plugin/dist/index.js +++ b/packages/vite-plugin/dist/index.js @@ -1,153 +1 @@ -import fs from 'fs'; -import path from 'path'; -import { fileURLToPath } from 'url'; -// The interprocess communication signal file for the web server -const HOT_FILE_PATH = 'app/storage/framework/runtime/vite.hot'; -/** - * Resolve the path to a resource, ensuring that the path works when used as an ESM package. - */ -function resolveResource(resource) { - // In ESM context, __dirname is not available, so we use fileURLToPath - try { - const __filename = fileURLToPath(import.meta.url); - const __dirname = path.dirname(__filename); - return path.resolve(__dirname, '../resources', resource); - } - catch (error) { - // Fallback for CommonJS - return path.resolve(__dirname, '../resources', resource); - } -} -/** - * Check if a file exists and is a file - */ -function fileExists(file) { - try { - return fs.statSync(file).isFile(); - } - catch { - return false; - } -} -/** - * Check if the JavaScript file has actual content to prevent empty app.js files from being compiled - */ -function hasJavaScriptContent(filePath) { - try { - if (!fs.existsSync(filePath)) - return false; - const content = fs.readFileSync(filePath, 'utf-8'); - // Remove comments and check if there's any actual code - return content.replace(/\/\*[\s\S]*?\*\/|\/\/.*/g, '').trim().length > 0; - } - catch (error) { - return false; - } -} -/** - * HydePHP Vite plugin for realtime compiler integration - */ -export default function hydePlugin(options = {}) { - const { input = ['resources/assets/app.css', 'resources/assets/app.js'], watch = ['_pages', '_posts', '_docs'], refresh = true, } = options; - let config; - let hotFilePath; - return { - name: 'hyde-vite-plugin', - config(config, { command }) { - // Only modify build configuration - if (command === 'build') { - // Process input files - use named keys to prevent filename collisions - const resolvedInput = {}; - for (const entry of input) { - const resolvedPath = path.resolve(process.cwd(), entry); - // Only include app.js if it has actual content - if (entry.endsWith('app.js')) { - if (hasJavaScriptContent(resolvedPath) && fileExists(resolvedPath)) { - resolvedInput.js = resolvedPath; - } - } - else if (entry.endsWith('app.css') && fileExists(resolvedPath)) { - resolvedInput.css = resolvedPath; - } - else if (fileExists(resolvedPath)) { - const basename = path.basename(entry, path.extname(entry)); - resolvedInput[basename] = resolvedPath; - } - } - return { - build: { - outDir: '_media', - emptyOutDir: false, - rollupOptions: { - input: resolvedInput, - output: { - entryFileNames: (chunkInfo) => { - // Use app.js for the JS entry point - if (chunkInfo.name === 'js') { - return 'app.js'; - } - return '[name].js'; - }, - chunkFileNames: '[name].js', - assetFileNames: (assetInfo) => { - // Use app.css for CSS assets - if (assetInfo.name && assetInfo.name.endsWith('.css')) { - return 'app.css'; - } - return '[name].[ext]'; - } - } - } - } - }; - } - }, - configResolved(resolvedConfig) { - config = resolvedConfig; - hotFilePath = path.resolve(process.cwd(), HOT_FILE_PATH); - }, - configureServer(server) { - // Create hot file when Vite server starts - fs.mkdirSync(path.dirname(hotFilePath), { recursive: true }); - fs.writeFileSync(hotFilePath, ''); - // Remove hot file when Vite server closes - ['SIGINT', 'SIGTERM'].forEach(signal => { - process.on(signal, () => { - try { - fs.rmSync(hotFilePath); - } - catch (error) { - // Ignore errors when removing hot file - } - process.exit(); - }); - }); - // Render the Vite index page when the root URL is requested - server.middlewares.use((req, res, next) => { - if (req.url === '/') { - try { - const indexPath = resolveResource('index.html'); - const content = fs.readFileSync(indexPath, 'utf-8'); - res.end(content); - } - catch (error) { - next(); - } - } - else { - next(); - } - }); - // Add additional watch paths for content files if refresh option is enabled - if (refresh) { - watch.forEach(dir => { - const contentPath = path.resolve(process.cwd(), dir); - if (fs.existsSync(contentPath)) { - server.watcher.add(path.join(contentPath, '**')); - server.watcher.add(path.join(contentPath, '**/**')); - } - }); - } - } - }; -} +import fs from"fs";import path from"path";import{fileURLToPath}from"url";const HOT_FILE_PATH="app/storage/framework/runtime/vite.hot";function resolveResource(e){try{const s=fileURLToPath(import.meta.url),t=path.dirname(s);return path.resolve(t,"../resources",e)}catch(s){return path.resolve(__dirname,"../resources",e)}}function fileExists(e){try{return fs.statSync(e).isFile()}catch{return!1}}function hasJavaScriptContent(e){try{if(!fs.existsSync(e))return!1;return fs.readFileSync(e,"utf-8").replace(/\/\*[\s\S]*?\*\/|\/\/.*/g,"").trim().length>0}catch(e){return!1}}export default function hydePlugin(e={}){const{input:s=["resources/assets/app.css","resources/assets/app.js"],watch:t=["_pages","_posts","_docs"],refresh:r=!0}=e;let a,n;return{name:"hyde-vite-plugin",config(e,{command:t}){if("build"===t){const e={};for(const t of s){const s=path.resolve(process.cwd(),t);if(t.endsWith("app.js"))hasJavaScriptContent(s)&&fileExists(s)&&(e.js=s);else if(t.endsWith("app.css")&&fileExists(s))e.css=s;else if(fileExists(s)){e[path.basename(t,path.extname(t))]=s}}return{build:{outDir:"_media",emptyOutDir:!1,rollupOptions:{input:e,output:{entryFileNames:e=>"js"===e.name?"app.js":"[name].js",chunkFileNames:"[name].js",assetFileNames:e=>e.name&&e.name.endsWith(".css")?"app.css":"[name].[ext]"}}}}}},configResolved(e){a=e,n=path.resolve(process.cwd(),HOT_FILE_PATH)},configureServer(e){fs.mkdirSync(path.dirname(n),{recursive:!0}),fs.writeFileSync(n,""),["SIGINT","SIGTERM"].forEach((e=>{process.on(e,(()=>{try{fs.rmSync(n)}catch(e){}process.exit()}))})),e.middlewares.use(((e,s,t)=>{if("/"===e.url)try{const e=resolveResource("index.html"),t=fs.readFileSync(e,"utf-8");s.end(t)}catch(e){t()}else t()})),r&&t.forEach((s=>{const t=path.resolve(process.cwd(),s);fs.existsSync(t)&&(e.watcher.add(path.join(t,"**")),e.watcher.add(path.join(t,"**/**")))}))}}} \ No newline at end of file diff --git a/packages/vite-plugin/package-lock.json b/packages/vite-plugin/package-lock.json index 26b3ce96aea..4b36fdf3ece 100644 --- a/packages/vite-plugin/package-lock.json +++ b/packages/vite-plugin/package-lock.json @@ -10,379 +10,501 @@ "license": "MIT", "devDependencies": { "@types/node": "^20.0.0", + "terser": "^5.29.2", "typescript": "^5.0.0", - "vite": "^5.0.0" + "vite": "^6.0.0" }, "peerDependencies": { - "vite": "^4.0.0 || ^5.0.0" + "vite": "^6.0.0" } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", - "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.4.tgz", + "integrity": "sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "aix" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", - "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.4.tgz", + "integrity": "sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", - "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.4.tgz", + "integrity": "sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", - "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.4.tgz", + "integrity": "sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", - "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.4.tgz", + "integrity": "sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", - "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.4.tgz", + "integrity": "sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", - "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.4.tgz", + "integrity": "sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", - "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.4.tgz", + "integrity": "sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", - "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.4.tgz", + "integrity": "sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", - "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.4.tgz", + "integrity": "sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", - "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.4.tgz", + "integrity": "sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", - "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.4.tgz", + "integrity": "sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA==", "cpu": [ "loong64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", - "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.4.tgz", + "integrity": "sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg==", "cpu": [ "mips64el" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", - "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.4.tgz", + "integrity": "sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", - "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.4.tgz", + "integrity": "sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA==", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", - "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.4.tgz", + "integrity": "sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g==", "cpu": [ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.4.tgz", + "integrity": "sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.4.tgz", + "integrity": "sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", - "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.4.tgz", + "integrity": "sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "netbsd" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.4.tgz", + "integrity": "sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", - "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.4.tgz", + "integrity": "sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "openbsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", - "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.4.tgz", + "integrity": "sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "sunos" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", - "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.4.tgz", + "integrity": "sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", - "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.4.tgz", + "integrity": "sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", - "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.4.tgz", + "integrity": "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@rollup/rollup-android-arm-eabi": { @@ -660,42 +782,87 @@ "undici-types": "~6.19.2" } }, + "node_modules/acorn": { + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, "node_modules/esbuild": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", - "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.4.tgz", + "integrity": "sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==", "dev": true, "hasInstallScript": true, + "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=12" + "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" + "@esbuild/aix-ppc64": "0.25.4", + "@esbuild/android-arm": "0.25.4", + "@esbuild/android-arm64": "0.25.4", + "@esbuild/android-x64": "0.25.4", + "@esbuild/darwin-arm64": "0.25.4", + "@esbuild/darwin-x64": "0.25.4", + "@esbuild/freebsd-arm64": "0.25.4", + "@esbuild/freebsd-x64": "0.25.4", + "@esbuild/linux-arm": "0.25.4", + "@esbuild/linux-arm64": "0.25.4", + "@esbuild/linux-ia32": "0.25.4", + "@esbuild/linux-loong64": "0.25.4", + "@esbuild/linux-mips64el": "0.25.4", + "@esbuild/linux-ppc64": "0.25.4", + "@esbuild/linux-riscv64": "0.25.4", + "@esbuild/linux-s390x": "0.25.4", + "@esbuild/linux-x64": "0.25.4", + "@esbuild/netbsd-arm64": "0.25.4", + "@esbuild/netbsd-x64": "0.25.4", + "@esbuild/openbsd-arm64": "0.25.4", + "@esbuild/openbsd-x64": "0.25.4", + "@esbuild/sunos-x64": "0.25.4", + "@esbuild/win32-arm64": "0.25.4", + "@esbuild/win32-ia32": "0.25.4", + "@esbuild/win32-x64": "0.25.4" + } + }, + "node_modules/fdir": { + "version": "6.4.4", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.4.tgz", + "integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } } }, "node_modules/fsevents": { @@ -736,6 +903,19 @@ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true }, + "node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/postcss": { "version": "8.5.3", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", @@ -803,6 +983,16 @@ "fsevents": "~2.3.2" } }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -812,6 +1002,53 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/terser": { + "version": "5.39.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.39.2.tgz", + "integrity": "sha512-yEPUmWve+VA78bI71BW70Dh0TuV4HHd+I5SHOAfS1+QBOmvmCiiffgjR8ryyEd3KIfvPGFqoADt8LdQ6XpXIvg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.14.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.13.tgz", + "integrity": "sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, "node_modules/typescript": { "version": "5.8.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", @@ -832,20 +1069,24 @@ "dev": true }, "node_modules/vite": { - "version": "5.4.18", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.18.tgz", - "integrity": "sha512-1oDcnEp3lVyHCuQ2YFelM4Alm2o91xNoMncRm1U7S+JdYfYOvbiGZ3/CxGttrOu2M/KcGz7cRC2DoNUA6urmMA==", + "version": "6.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", + "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", "dev": true, + "license": "MIT", "dependencies": { - "esbuild": "^0.21.3", - "postcss": "^8.4.43", - "rollup": "^4.20.0" + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" }, "bin": { "vite": "bin/vite.js" }, "engines": { - "node": "^18.0.0 || >=20.0.0" + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" }, "funding": { "url": "https://github.com/vitejs/vite?sponsor=1" @@ -854,19 +1095,25 @@ "fsevents": "~2.3.3" }, "peerDependencies": { - "@types/node": "^18.0.0 || >=20.0.0", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", - "terser": "^5.4.0" + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" }, "peerDependenciesMeta": { "@types/node": { "optional": true }, + "jiti": { + "optional": true + }, "less": { "optional": true }, @@ -887,6 +1134,12 @@ }, "terser": { "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true } } } diff --git a/packages/vite-plugin/package.json b/packages/vite-plugin/package.json index 07035bf70b6..05ddb6c81ee 100644 --- a/packages/vite-plugin/package.json +++ b/packages/vite-plugin/package.json @@ -6,7 +6,7 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { - "build": "tsc", + "build": "tsc && terser dist/index.js -c -m -o dist/index.js", "dev": "tsc --watch", "prepublishOnly": "npm run build" }, @@ -32,6 +32,7 @@ "devDependencies": { "typescript": "^5.0.0", "@types/node": "^20.0.0", - "vite": "^6.0.0" + "vite": "^6.0.0", + "terser": "^5.29.2" } } From 2d3ea396ca43abae82e3ea9396194933e5cb69ba Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Tue, 20 May 2025 19:13:20 +0200 Subject: [PATCH 5/6] Reorder lines --- packages/vite-plugin/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite-plugin/package.json b/packages/vite-plugin/package.json index 05ddb6c81ee..69ea059102d 100644 --- a/packages/vite-plugin/package.json +++ b/packages/vite-plugin/package.json @@ -6,8 +6,8 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { - "build": "tsc && terser dist/index.js -c -m -o dist/index.js", "dev": "tsc --watch", + "build": "tsc && terser dist/index.js -c -m -o dist/index.js", "prepublishOnly": "npm run build" }, "repository": { From 636f5f1cc39abfa762a2039623651ce1c4b3a1ff Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 24 May 2025 15:47:46 +0200 Subject: [PATCH 6/6] Vite Plugin v1.0.0-RC.2 --- packages/vite-plugin/package-lock.json | 4 ++-- packages/vite-plugin/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/vite-plugin/package-lock.json b/packages/vite-plugin/package-lock.json index 4b36fdf3ece..59e968bc375 100644 --- a/packages/vite-plugin/package-lock.json +++ b/packages/vite-plugin/package-lock.json @@ -1,12 +1,12 @@ { "name": "hyde-vite-plugin", - "version": "1.0.0-RC.1", + "version": "1.0.0-RC.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "hyde-vite-plugin", - "version": "1.0.0-RC.1", + "version": "1.0.0-RC.2", "license": "MIT", "devDependencies": { "@types/node": "^20.0.0", diff --git a/packages/vite-plugin/package.json b/packages/vite-plugin/package.json index 69ea059102d..ec4a1878b41 100644 --- a/packages/vite-plugin/package.json +++ b/packages/vite-plugin/package.json @@ -1,6 +1,6 @@ { "name": "hyde-vite-plugin", - "version": "1.0.0-RC.1", + "version": "1.0.0-RC.2", "description": "HydePHP Vite plugin for realtime compiler integration", "type": "module", "main": "dist/index.js",