Repository navigation
Conversation
10up-toolkit 8 keeps the CLI, the "10up-toolkit" package.json config and the dist layout, and swaps the engine underneath: - build/watch/start run the wp-vite runner from @10up/wp-vite-plugins on Vite+ (vp). Toolkit generates the Vite config from package.json (config/vite/index.mjs); a project vite.config.mjs can extend it with toolkit() from '10up-toolkit/vite'. - start --hot / dev start a Vite dev server bridged by dist/dev-server.php. A dist/fast-refresh.php shim keeps toolkit 7 PHP working. - JSX in .js files, toolkit's default PostCSS stack, block assets, per-block styles in blocks/autoenqueue, Script Modules, library builds and uninstalled @wordpress/* externals keep working. - lint-js and format-js run Oxlint and Oxfmt (ESLint still runs for projects that keep an ESLint config); test runs Vitest. - Remove every webpack, Babel and Jest config and dependency, Linaria and vanilla-extract support, image minification and the bundle analyzer. - Port the toolkit's own tests to Vitest; require Node ^22.18 || >=24.11. Needs @10up/wp-vite-plugins 1.0.0-alpha.4. Run npm install after it is published to refresh package-lock.json.
🦋 Changeset detectedLatest commit: ae80b94 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Member
|
Closing: we're not shipping a Vite-based toolkit 8. Projects move to Vite+ with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
10up-toolkit 8 builds with Vite+ (Vite 8 + Rolldown) and
@10up/wp-vite-pluginsinstead of webpack. The CLI, the"10up-toolkit"config inpackage.jsonand the dist layout stay the same, so most projects upgrade by bumping the version.Companion PRs: 10up/wp-vite-plugins (
feat/toolkit-engine) and 10up/wp-scaffold#333.https://github.com/10up/wp-vite-plugins/pull/38
How it works
build,watchandstartcall thewp-viterunner from@10up/wp-vite-plugins, which runsvpfrom the bundledvite-plus. It does a script pass and, when the project has Script Modules, a module pass into onedist/.When the project has no
vite.config.*, toolkit passes its own config (config/vite/index.mjs) with--config. That config turns the"10up-toolkit"block into a Vite config. Toolkit hands it the resolved config, CLI flags included, throughTENUP_TOOLKIT_CONFIG.Projects can extend the generated config:
What stays compatible
entry→dist/js/<name>.js/dist/css/<name>.css. CSS imported by a JS entry →dist/css/<name>.css.filenames.*overrides and-blockentry names are honored.useBlockAssetsdiscovers assets fromblock.json, copiesblock.jsonand PHP, and writesblocks-manifest.phpwhenuseBlockManifestis set.loadBlockSpecificStylesbuilds todist/blocks/autoenqueue/.moduleEntry,useScriptModulesand--block-modulesbuild Script Modules..asset.phpfiles for every script and stylesheet.@wordpress/*imports still work without installing the packages, throughuninstalledWordPressPackages: 'external'.wpDependencyExternals: falseand--wp=falsestill turn externals off..jsfiles: compiled by apreplugin beforewpExternalssees the code.postcss-preset-envat stage 0, and the editor styles wrapper foreditor-style.css. A projectpostcss.config.jsstill replaces it.source/main,-f,-o,-i,--name,--external) go through Vite's library mode.--sourcemap,publicPath/ASSET_PATH,--port.What changed
start --hot(and the newdevcommand) starts a Vite dev server. WordPress reaches it throughdist/dev-server.php. Toolkit also writes adist/fast-refresh.phpshim that loads it and turnsTenUpToolkit\set_dist_url_path()into a no-op, so toolkit 7 PHP keeps working.lint-js/format-jsrun Oxlint / Oxfmt.config/oxlintrc.jsonandconfig/oxfmtrc.json(10up house style)..oxlintrc.json/.oxfmtrc.json, or avite.config.*, takes precedence.eslintitself still runs ESLint, so its rules don't change on upgrade.testruns Vitest: jsdom environment, Jest-style globals,jestaliased tovi, and the same file patterns as before.test-unit-jestandtest-unit-jsare aliases.react-jsx-runtimeinstead ofwp-element. WordPress 6.6+ provides it.^22.18.0 || >=24.11.0, the versions Vite+ supports. CI now runs on Node 22 and 24.Removed
webpack.config.jsorbabel.config.jsis ignored.projects/10up-theme.--analyze,--target,--include, core-js polyfills.@10up/eslint-configand@10up/babel-preset-defaultas peer dependencies. The packages themselves stay in the monorepo.UPGRADING.mdhas a "7 to 8" section covering all of this. The README now covers the dev server, the linting setup, testing, and customizing the Vite config. The sections about webpack, BrowserSync, the bundle analyzer and Linaria are gone.Tests
vp test): 54 pass.__tests__/build-project-*fixture suites run a real build.react-jsx-runtimereplaceswp-element.(width>=30em)instead ofmin-width: 30em.block.jsonfixture, and removed the Linaria and vanilla-extract fixtures.projects/10up-theme,projects/libraryandprojects/library-tsend to end:build,lint, andtestfor the library. I also checked the dev server: hot file, dev sidecars, JSX served from.js, and cleanup on exit.Changeset
10up-toolkit: major.