diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bf204d0be..b8723862c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,65 +4,64 @@ All notable changes to this project are documented in this file by a CI job that runs on every NPM release. The file follows the [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format. -## [v1.2.3] (2025-07-21) +## [v1.2.3] (2025-07-21) ### Enhancements -- [Playground CLI] Consolidate auto mounting logic. ([#2360](https://github.com/WordPress/wordpress-playground/pull/2360)) -- [Playground CLI] Move mounting code to mount.ts. ([#2362](https://github.com/WordPress/wordpress-playground/pull/2362)) +- [Playground CLI] Consolidate auto mounting logic. ([#2360](https://github.com/WordPress/wordpress-playground/pull/2360)) +- [Playground CLI] Move mounting code to mount.ts. ([#2362](https://github.com/WordPress/wordpress-playground/pull/2362)) ### Blueprints -- [CLI] Move Blueprints v2 to Playground CLI package. ([#2364](https://github.com/WordPress/wordpress-playground/pull/2364)) +- [CLI] Move Blueprints v2 to Playground CLI package. ([#2364](https://github.com/WordPress/wordpress-playground/pull/2364)) ### Public API - #### Blueprints -- [Client] Accept wasm.wordpress.net as an official origin. ([#2368](https://github.com/WordPress/wordpress-playground/pull/2368)) +- [Client] Accept wasm.wordpress.net as an official origin. ([#2368](https://github.com/WordPress/wordpress-playground/pull/2368)) ### Tools -- Make PHP 8.3 the default version. ([#2371](https://github.com/WordPress/wordpress-playground/pull/2371)) +- Make PHP 8.3 the default version. ([#2371](https://github.com/WordPress/wordpress-playground/pull/2371)) #### PHP WebAssembly -- Add `--xdebug` option in php-wasm CLI and wp-playground CLI. ([#2346](https://github.com/WordPress/wordpress-playground/pull/2346)) +- Add `--xdebug` option in php-wasm CLI and wp-playground CLI. ([#2346](https://github.com/WordPress/wordpress-playground/pull/2346)) ### Documentation -- Adding Playground CLI page and removing wp-now references. ([#2337](https://github.com/WordPress/wordpress-playground/pull/2337)) -- Adding pt-br About and Launch Page. ([#2358](https://github.com/WordPress/wordpress-playground/pull/2358)) -- Adding three new flags on the CLI README file. ([#2325](https://github.com/WordPress/wordpress-playground/pull/2325)) -- Adding video content in Japanese to resources page. ([#2354](https://github.com/WordPress/wordpress-playground/pull/2354)) -- Updating web instance page documentation. ([#2365](https://github.com/WordPress/wordpress-playground/pull/2365)) +- Adding Playground CLI page and removing wp-now references. ([#2337](https://github.com/WordPress/wordpress-playground/pull/2337)) +- Adding pt-br About and Launch Page. ([#2358](https://github.com/WordPress/wordpress-playground/pull/2358)) +- Adding three new flags on the CLI README file. ([#2325](https://github.com/WordPress/wordpress-playground/pull/2325)) +- Adding video content in Japanese to resources page. ([#2354](https://github.com/WordPress/wordpress-playground/pull/2354)) +- Updating web instance page documentation. ([#2365](https://github.com/WordPress/wordpress-playground/pull/2365)) ### PHP WebAssembly -- [PHP-wasm Node] Remove unused node creation code from createNodeFsMountHandler. ([#2379](https://github.com/WordPress/wordpress-playground/pull/2379)) -- [PHP-wasm] File mounting in NODEFS. ([#2338](https://github.com/WordPress/wordpress-playground/pull/2338)) -- [PHP] Improve error logging. ([#2357](https://github.com/WordPress/wordpress-playground/pull/2357)) -- [PHP] Isomorphic, reusable spawn handler. ([#2359](https://github.com/WordPress/wordpress-playground/pull/2359)) -- [PHP] Refresh the latest PHP versions before recompiling. ([#2372](https://github.com/WordPress/wordpress-playground/pull/2372)) -- [php-wasm/universal] Try require() before dynamic imprt in comlink-sync.ts. ([#2363](https://github.com/WordPress/wordpress-playground/pull/2363)) +- [PHP-wasm Node] Remove unused node creation code from createNodeFsMountHandler. ([#2379](https://github.com/WordPress/wordpress-playground/pull/2379)) +- [PHP-wasm] File mounting in NODEFS. ([#2338](https://github.com/WordPress/wordpress-playground/pull/2338)) +- [PHP] Improve error logging. ([#2357](https://github.com/WordPress/wordpress-playground/pull/2357)) +- [PHP] Isomorphic, reusable spawn handler. ([#2359](https://github.com/WordPress/wordpress-playground/pull/2359)) +- [PHP] Refresh the latest PHP versions before recompiling. ([#2372](https://github.com/WordPress/wordpress-playground/pull/2372)) +- [php-wasm/universal] Try require() before dynamic imprt in comlink-sync.ts. ([#2363](https://github.com/WordPress/wordpress-playground/pull/2363)) ### Website -- Deploy public web app after WP major/beta update. ([#2378](https://github.com/WordPress/wordpress-playground/pull/2378)) +- Deploy public web app after WP major/beta update. ([#2378](https://github.com/WordPress/wordpress-playground/pull/2378)) ### Bug Fixes -- Allow the WP update and changelog workflows to commit to trunk again. ([#2377](https://github.com/WordPress/wordpress-playground/pull/2377)) -- Fix failing WP update workflows. ([#2376](https://github.com/WordPress/wordpress-playground/pull/2376)) +- Allow the WP update and changelog workflows to commit to trunk again. ([#2377](https://github.com/WordPress/wordpress-playground/pull/2377)) +- Fix failing WP update workflows. ([#2376](https://github.com/WordPress/wordpress-playground/pull/2376)) ### Various -- Add Japanese translations to Resources References. ([#2352](https://github.com/WordPress/wordpress-playground/pull/2352)) -- Add new logo and open graph image. ([#2350](https://github.com/WordPress/wordpress-playground/pull/2350)) -- Adding Portuguese version for Code Standards, Code, and Documentation.. ([#2343](https://github.com/WordPress/wordpress-playground/pull/2343)) -- Adding new icons and og:Image for the Playground Web instance. ([#2367](https://github.com/WordPress/wordpress-playground/pull/2367)) -- Update Japanese translations to main directory. ([#2375](https://github.com/WordPress/wordpress-playground/pull/2375)) +- Add Japanese translations to Resources References. ([#2352](https://github.com/WordPress/wordpress-playground/pull/2352)) +- Add new logo and open graph image. ([#2350](https://github.com/WordPress/wordpress-playground/pull/2350)) +- Adding Portuguese version for Code Standards, Code, and Documentation.. ([#2343](https://github.com/WordPress/wordpress-playground/pull/2343)) +- Adding new icons and og:Image for the Playground Web instance. ([#2367](https://github.com/WordPress/wordpress-playground/pull/2367)) +- Update Japanese translations to main directory. ([#2375](https://github.com/WordPress/wordpress-playground/pull/2375)) ### Contributors @@ -70,7 +69,6 @@ The following contributors merged PRs in this release: @adamziel @bgrgicak @brandonpayton @fellyph @mho22 @shimotmk - ## [v1.2.2] (2025-07-14) ### Enhancements diff --git a/packages/docs/site/docs/main/changelog.md b/packages/docs/site/docs/main/changelog.md index 87eb0edd76..52bd234d69 100644 --- a/packages/docs/site/docs/main/changelog.md +++ b/packages/docs/site/docs/main/changelog.md @@ -9,65 +9,64 @@ All notable changes to this project are documented in this file by a CI job that runs on every NPM release. The file follows the [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format. -## [v1.2.3] (2025-07-21) +## [v1.2.3] (2025-07-21) ### Enhancements -- [Playground CLI] Consolidate auto mounting logic. ([#2360](https://github.com/WordPress/wordpress-playground/pull/2360)) -- [Playground CLI] Move mounting code to mount.ts. ([#2362](https://github.com/WordPress/wordpress-playground/pull/2362)) +- [Playground CLI] Consolidate auto mounting logic. ([#2360](https://github.com/WordPress/wordpress-playground/pull/2360)) +- [Playground CLI] Move mounting code to mount.ts. ([#2362](https://github.com/WordPress/wordpress-playground/pull/2362)) ### Blueprints -- [CLI] Move Blueprints v2 to Playground CLI package. ([#2364](https://github.com/WordPress/wordpress-playground/pull/2364)) +- [CLI] Move Blueprints v2 to Playground CLI package. ([#2364](https://github.com/WordPress/wordpress-playground/pull/2364)) ### Public API - #### Blueprints -- [Client] Accept wasm.wordpress.net as an official origin. ([#2368](https://github.com/WordPress/wordpress-playground/pull/2368)) +- [Client] Accept wasm.wordpress.net as an official origin. ([#2368](https://github.com/WordPress/wordpress-playground/pull/2368)) ### Tools -- Make PHP 8.3 the default version. ([#2371](https://github.com/WordPress/wordpress-playground/pull/2371)) +- Make PHP 8.3 the default version. ([#2371](https://github.com/WordPress/wordpress-playground/pull/2371)) #### PHP WebAssembly -- Add `--xdebug` option in php-wasm CLI and wp-playground CLI. ([#2346](https://github.com/WordPress/wordpress-playground/pull/2346)) +- Add `--xdebug` option in php-wasm CLI and wp-playground CLI. ([#2346](https://github.com/WordPress/wordpress-playground/pull/2346)) ### Documentation -- Adding Playground CLI page and removing wp-now references. ([#2337](https://github.com/WordPress/wordpress-playground/pull/2337)) -- Adding pt-br About and Launch Page. ([#2358](https://github.com/WordPress/wordpress-playground/pull/2358)) -- Adding three new flags on the CLI README file. ([#2325](https://github.com/WordPress/wordpress-playground/pull/2325)) -- Adding video content in Japanese to resources page. ([#2354](https://github.com/WordPress/wordpress-playground/pull/2354)) -- Updating web instance page documentation. ([#2365](https://github.com/WordPress/wordpress-playground/pull/2365)) +- Adding Playground CLI page and removing wp-now references. ([#2337](https://github.com/WordPress/wordpress-playground/pull/2337)) +- Adding pt-br About and Launch Page. ([#2358](https://github.com/WordPress/wordpress-playground/pull/2358)) +- Adding three new flags on the CLI README file. ([#2325](https://github.com/WordPress/wordpress-playground/pull/2325)) +- Adding video content in Japanese to resources page. ([#2354](https://github.com/WordPress/wordpress-playground/pull/2354)) +- Updating web instance page documentation. ([#2365](https://github.com/WordPress/wordpress-playground/pull/2365)) ### PHP WebAssembly -- [PHP-wasm Node] Remove unused node creation code from createNodeFsMountHandler. ([#2379](https://github.com/WordPress/wordpress-playground/pull/2379)) -- [PHP-wasm] File mounting in NODEFS. ([#2338](https://github.com/WordPress/wordpress-playground/pull/2338)) -- [PHP] Improve error logging. ([#2357](https://github.com/WordPress/wordpress-playground/pull/2357)) -- [PHP] Isomorphic, reusable spawn handler. ([#2359](https://github.com/WordPress/wordpress-playground/pull/2359)) -- [PHP] Refresh the latest PHP versions before recompiling. ([#2372](https://github.com/WordPress/wordpress-playground/pull/2372)) -- [php-wasm/universal] Try require() before dynamic imprt in comlink-sync.ts. ([#2363](https://github.com/WordPress/wordpress-playground/pull/2363)) +- [PHP-wasm Node] Remove unused node creation code from createNodeFsMountHandler. ([#2379](https://github.com/WordPress/wordpress-playground/pull/2379)) +- [PHP-wasm] File mounting in NODEFS. ([#2338](https://github.com/WordPress/wordpress-playground/pull/2338)) +- [PHP] Improve error logging. ([#2357](https://github.com/WordPress/wordpress-playground/pull/2357)) +- [PHP] Isomorphic, reusable spawn handler. ([#2359](https://github.com/WordPress/wordpress-playground/pull/2359)) +- [PHP] Refresh the latest PHP versions before recompiling. ([#2372](https://github.com/WordPress/wordpress-playground/pull/2372)) +- [php-wasm/universal] Try require() before dynamic imprt in comlink-sync.ts. ([#2363](https://github.com/WordPress/wordpress-playground/pull/2363)) ### Website -- Deploy public web app after WP major/beta update. ([#2378](https://github.com/WordPress/wordpress-playground/pull/2378)) +- Deploy public web app after WP major/beta update. ([#2378](https://github.com/WordPress/wordpress-playground/pull/2378)) ### Bug Fixes -- Allow the WP update and changelog workflows to commit to trunk again. ([#2377](https://github.com/WordPress/wordpress-playground/pull/2377)) -- Fix failing WP update workflows. ([#2376](https://github.com/WordPress/wordpress-playground/pull/2376)) +- Allow the WP update and changelog workflows to commit to trunk again. ([#2377](https://github.com/WordPress/wordpress-playground/pull/2377)) +- Fix failing WP update workflows. ([#2376](https://github.com/WordPress/wordpress-playground/pull/2376)) ### Various -- Add Japanese translations to Resources References. ([#2352](https://github.com/WordPress/wordpress-playground/pull/2352)) -- Add new logo and open graph image. ([#2350](https://github.com/WordPress/wordpress-playground/pull/2350)) -- Adding Portuguese version for Code Standards, Code, and Documentation.. ([#2343](https://github.com/WordPress/wordpress-playground/pull/2343)) -- Adding new icons and og:Image for the Playground Web instance. ([#2367](https://github.com/WordPress/wordpress-playground/pull/2367)) -- Update Japanese translations to main directory. ([#2375](https://github.com/WordPress/wordpress-playground/pull/2375)) +- Add Japanese translations to Resources References. ([#2352](https://github.com/WordPress/wordpress-playground/pull/2352)) +- Add new logo and open graph image. ([#2350](https://github.com/WordPress/wordpress-playground/pull/2350)) +- Adding Portuguese version for Code Standards, Code, and Documentation.. ([#2343](https://github.com/WordPress/wordpress-playground/pull/2343)) +- Adding new icons and og:Image for the Playground Web instance. ([#2367](https://github.com/WordPress/wordpress-playground/pull/2367)) +- Update Japanese translations to main directory. ([#2375](https://github.com/WordPress/wordpress-playground/pull/2375)) ### Contributors @@ -75,7 +74,6 @@ The following contributors merged PRs in this release: @adamziel @bgrgicak @brandonpayton @fellyph @mho22 @shimotmk - ## [v1.2.2] (2025-07-14) ### Enhancements diff --git a/packages/php-wasm/xdebug-bridge/.eslintrc.json b/packages/php-wasm/xdebug-bridge/.eslintrc.json index 86b880b02c..79fd7c1d98 100644 --- a/packages/php-wasm/xdebug-bridge/.eslintrc.json +++ b/packages/php-wasm/xdebug-bridge/.eslintrc.json @@ -15,4 +15,4 @@ "rules": {} } ] -} \ No newline at end of file +} diff --git a/packages/php-wasm/xdebug-bridge/README.md b/packages/php-wasm/xdebug-bridge/README.md index 8f6899c84e..b6f6a4f0fc 100644 --- a/packages/php-wasm/xdebug-bridge/README.md +++ b/packages/php-wasm/xdebug-bridge/README.md @@ -21,10 +21,10 @@ await server.start(); // Start with custom configuration const server = startXDebugBridge({ - protocol: 'cdp', // or 'dap' - xdebugServerPort: 9003, // XDebug connection port - xdebugServerHost: 'localhost', - verbose: false, // Silent mode + protocol: 'cdp', // or 'dap' + xdebugServerPort: 9003, // XDebug connection port + xdebugServerHost: 'localhost', + verbose: false, // Silent mode }); await server.start(); @@ -51,20 +51,20 @@ npx xdebug-bridge --help ## Configuration Options -- `protocol`: Protocol to use ('cdp' or 'dap', default: 'cdp') -- `xdebugServerPort`: Port to listen for XDebug connections (default: 9003) -- `xdebugServerHost`: Host to bind to (default: 'localhost') -- `verbose`: Enable verbose logging (default: false for API, true for CLI) -- `logger`: Custom logger function +- `protocol`: Protocol to use ('cdp' or 'dap', default: 'cdp') +- `xdebugServerPort`: Port to listen for XDebug connections (default: 9003) +- `xdebugServerHost`: Host to bind to (default: 'localhost') +- `verbose`: Enable verbose logging (default: false for API, true for CLI) +- `logger`: Custom logger function ## Events The server emits events for monitoring connection activity: -- `started`: Server has started -- `stopped`: Server has stopped -- `connection`: New XDebug connection established -- `disconnection`: XDebug connection closed -- `xdebugData`: Raw XDebug data received -- `error`: Server error occurred -- `socketError`: Socket-level error occurred \ No newline at end of file +- `started`: Server has started +- `stopped`: Server has stopped +- `connection`: New XDebug connection established +- `disconnection`: XDebug connection closed +- `xdebugData`: Raw XDebug data received +- `error`: Server error occurred +- `socketError`: Socket-level error occurred diff --git a/packages/php-wasm/xdebug-bridge/package.json b/packages/php-wasm/xdebug-bridge/package.json index 5db11c634e..696c1e0ef3 100644 --- a/packages/php-wasm/xdebug-bridge/package.json +++ b/packages/php-wasm/xdebug-bridge/package.json @@ -44,4 +44,4 @@ "node": ">=20.18.3", "npm": ">=10.1.0" } -} \ No newline at end of file +} diff --git a/packages/php-wasm/xdebug-bridge/src/index.ts b/packages/php-wasm/xdebug-bridge/src/index.ts index 32160c89bd..84eddb25e0 100644 --- a/packages/php-wasm/xdebug-bridge/src/index.ts +++ b/packages/php-wasm/xdebug-bridge/src/index.ts @@ -1 +1 @@ -export * from './xdebug-bridge'; \ No newline at end of file +export * from './xdebug-bridge'; diff --git a/packages/php-wasm/xdebug-bridge/tsconfig.json b/packages/php-wasm/xdebug-bridge/tsconfig.json index 3c186af855..e4e0c46e69 100644 --- a/packages/php-wasm/xdebug-bridge/tsconfig.json +++ b/packages/php-wasm/xdebug-bridge/tsconfig.json @@ -18,4 +18,4 @@ "path": "./tsconfig.spec.json" } ] -} \ No newline at end of file +} diff --git a/packages/php-wasm/xdebug-bridge/tsconfig.lib.json b/packages/php-wasm/xdebug-bridge/tsconfig.lib.json index aa3ac087ae..3383a9c93a 100644 --- a/packages/php-wasm/xdebug-bridge/tsconfig.lib.json +++ b/packages/php-wasm/xdebug-bridge/tsconfig.lib.json @@ -7,4 +7,4 @@ }, "include": ["src/**/*.ts"], "exclude": ["src/**/*.spec.ts", "src/**/*.test.ts"] -} \ No newline at end of file +} diff --git a/packages/php-wasm/xdebug-bridge/tsconfig.spec.json b/packages/php-wasm/xdebug-bridge/tsconfig.spec.json index 70af9d81e6..231650b3da 100644 --- a/packages/php-wasm/xdebug-bridge/tsconfig.spec.json +++ b/packages/php-wasm/xdebug-bridge/tsconfig.spec.json @@ -11,4 +11,4 @@ "src/**/*.spec.ts", "src/**/*.d.ts" ] -} \ No newline at end of file +} diff --git a/packages/playground/remote/src/lib/worker-thread.ts b/packages/playground/remote/src/lib/worker-thread.ts index 43d419ba12..ec72976816 100644 --- a/packages/playground/remote/src/lib/worker-thread.ts +++ b/packages/playground/remote/src/lib/worker-thread.ts @@ -59,6 +59,8 @@ import { networkingDisabledFunctions, } from './disabled-functions'; import { WordPressFetchNetworkTransport } from './wordpress-fetch-network-transport'; +/* @ts-ignore */ +import { corsProxyUrl as defaultCorsProxyUrl } from 'virtual:cors-proxy-url'; // post message to parent self.postMessage('worker-script-started'); @@ -189,6 +191,10 @@ export class PlaygroundWorkerEndpoint extends PHPWorker { throw new Error('Playground already booted'); } + if (corsProxyUrl === undefined) { + corsProxyUrl = defaultCorsProxyUrl; + } + this.booted = true; this.scope = scope; this.requestedWordPressVersion = wpVersion; diff --git a/packages/playground/remote/vite.config.ts b/packages/playground/remote/vite.config.ts index 236899b88d..09ca73d3a6 100644 --- a/packages/playground/remote/vite.config.ts +++ b/packages/playground/remote/vite.config.ts @@ -10,8 +10,11 @@ import { viteTsConfigPaths } from '../../vite-extensions/vite-ts-config-paths'; import { copyFileSync, existsSync } from 'fs'; // eslint-disable-next-line @nx/enforce-module-boundaries import { buildVersionPlugin } from '../../vite-extensions/vite-build-version'; +// eslint-disable-next-line @nx/enforce-module-boundaries +import virtualModule from '../../vite-extensions/vite-virtual-module'; const path = (filename: string) => new URL(filename, import.meta.url).pathname; + const plugins = [ viteTsConfigPaths({ root: '../../../', @@ -37,78 +40,96 @@ const plugins = [ } as Plugin, buildVersionPlugin('remote-config'), ]; -export default defineConfig({ - assetsInclude: ['**/*.wasm', '**/*.dat', '*.zip'], - cacheDir: '../../../node_modules/.vite/playground', - // Bundled WordPress files live in a separate dependency-free `wordpress` - // package so that every package may use them without causing circular - // dependencies. - // Other than that, the `remote` package has no public assets of its own. - // Therefore, let's just point the `remote` public directory to the - // `wordpress` package to make WordPress assets available. - publicDir: path('../wordpress-builds/public'), - css: { - modules: { - localsConvention: 'camelCaseOnly', +export default defineConfig(({ mode }) => { + const corsProxyUrl = + 'CORS_PROXY_URL' in process.env + ? process.env['CORS_PROXY_URL'] + : mode === 'production' + ? 'https://wordpress-playground-cors-proxy.net/?' + : 'http://127.0.0.1:5263/cors-proxy.php?'; + + plugins.push( + virtualModule({ + name: 'cors-proxy-url', + content: ` + export const corsProxyUrl = ${JSON.stringify(corsProxyUrl || undefined)};`, + }) + ); + + return { + assetsInclude: ['**/*.wasm', '**/*.dat', '*.zip'], + cacheDir: '../../../node_modules/.vite/playground', + // Bundled WordPress files live in a separate dependency-free `wordpress` + // package so that every package may use them without causing circular + // dependencies. + // Other than that, the `remote` package has no public assets of its own. + // Therefore, let's just point the `remote` public directory to the + // `wordpress` package to make WordPress assets available. + publicDir: path('../wordpress-builds/public'), + + css: { + modules: { + localsConvention: 'camelCaseOnly', + }, }, - }, - preview: { - port: remoteDevServerPort - 100, - host: remoteDevServerHost, - }, + preview: { + port: remoteDevServerPort - 100, + host: remoteDevServerHost, + }, - server: { - port: remoteDevServerPort, - host: remoteDevServerHost, - allowedHosts: ['playground.test'], - fs: { - // Allow serving files from the 'packages' directory - allow: ['../../'], + server: { + port: remoteDevServerPort, + host: remoteDevServerHost, + allowedHosts: ['playground.test'], + fs: { + // Allow serving files from the 'packages' directory + allow: ['../../'], + }, }, - }, - plugins, + plugins, - worker: { - format: 'es', - plugins: () => plugins, - rollupOptions: { - output: { - // Ensure the service worker always has the same name - entryFileNames: (chunkInfo: any) => { - if (chunkInfo.name === 'service-worker') { - return 'sw.js'; - } - return '[name]-[hash].js'; + worker: { + format: 'es', + plugins: () => plugins, + rollupOptions: { + output: { + // Ensure the service worker always has the same name + entryFileNames: (chunkInfo: any) => { + if (chunkInfo.name === 'service-worker') { + return 'sw.js'; + } + return '[name]-[hash].js'; + }, }, }, }, - }, - build: { - target: 'esnext', - // Important: Vite does not extract static assets as separate files - // in the library mode. assetsInlineLimit: 0 only works - // in the app mode. - // @see https://github.com/vitejs/vite/issues/3295 - assetsInlineLimit: 0, - sourcemap: true, - rollupOptions: { - input: { - wordpress: path('/remote.html'), + build: { + target: 'esnext', + // Important: Vite does not extract static assets as separate files + // in the library mode. assetsInlineLimit: 0 only works + // in the app mode. + // @see https://github.com/vitejs/vite/issues/3295 + assetsInlineLimit: 0, + sourcemap: true, + rollupOptions: { + input: { + wordpress: path('/remote.html'), + }, }, }, - }, - test: { - globals: true, - cache: { - dir: '../../../node_modules/.vitest', + test: { + globals: true, + cache: { + dir: '../../../node_modules/.vitest', + }, + environment: 'node', + include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], + reporters: ['default'], }, - environment: 'node', - include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], - reporters: ['default'], - }, + }; });