Strapi admin bundler configuration with Vite or webpack

Strapi 5 builds the admin panel with a bundler that you can configure. This page explains when to adjust Vite, when to keep webpack, and how aliases and build speed affect large admin customizations.

On this page

Strapi admin bundler configuration: when a customized admin build needs attention

Bundler configuration controls how Strapi 5 compiles the admin panel's JavaScript, styles and assets into the files editors load in their browser. A team needs to look at it once the admin carries real customization, such as custom plugins, homepage widgets, branding or extra aliases, and the admin either builds slowly or fails after a change that looked small. The admin is a separate build from the API. The content API, your content types and your database do not depend on how the admin is bundled, but every admin build reads the same bundler settings. A change to the Vite configuration, or to a webpack configuration if your project keeps one, therefore affects every admin build in every environment, including the ones your editors use. Treat that file as shared infrastructure and review it the way you would review server code.

The first decision is which bundler your project runs and whether that choice still fits the customizations. Strapi 5 uses Vite for the admin build by default, and projects that were moved from older setups may still carry webpack-specific settings that no longer match the current admin. Before changing anything, confirm which bundler and which Strapi version your project actually uses by checking the project's dependencies and the admin configuration file in the repository. Ask your team to record the Node.js version used for builds, since Strapi 5 runs only on Active or Maintenance LTS Node.js versions and a build on an unsupported runtime can fail in ways that look like configuration errors.

The second decision is how far to push customization through the bundler. Aliases, custom resolvers and plugin entry points make the admin code easier to write, but each one adds a path that must survive upgrades and must be rebuilt on every deployment. Keep a short list of what the configuration changes and why, and test a full admin build in a staging environment after each Strapi minor release. Strapi minor releases ship often, so the cost of this review is recurring, not one-time. A quote for this work should name the bundler in use, the number of custom admin modules affected and who will own the configuration after handover.

Which bundler settings fit which admin customization

This table compares the admin build areas you can change in Strapi 5, from Vite plugins and aliases to build performance and keeping webpack. Read each row for when the setting fits your customization and what it tends to affect at upgrade time. Confirm the exact config keys and the bundler used by each Strapi 5 minor version in the current admin customization docs before you rely on any row.

Configuration areaFits whenWhat it changes for upgradesConfirm before relying on it
Vite pluginsAdmin extensions need a build-time transform or an extra asset handlerPlugin list can break when Strapi or Vite changes defaultsPlugin compatibility with the Vite version your Strapi minor ships
Resolve aliasesShared components, icons or design tokens live outside the admin folderAlias targets must move when folders are restructuredAlias keys and whether TypeScript path settings must match
Dev server optionsLocal development runs on another host, port or behind a proxyDev settings do not change the production build but affect proxy and CORS in developmentWhich keys control the dev server and admin path in your version
Build output and chunkingLarge admin customizations produce slow editor page loadsChunking defaults are a likely change point between minor releasesDefault chunk behavior and any supported override keys
Keeping webpackAn existing admin customization depends on webpack loaders or configWebpack overrides need re-checking on every upgrade and may stop being supportedWhether your target Strapi 5 minor still accepts a webpack override
Build performance settingsBuild times grow with many custom plugins and large component librariesCache directories may need clearing after an upgrade or dependency changeCache location and whether CI can reuse it safely
Pinned toolchain in CIThe admin is built in a pipeline before the container image is createdBundler and Node versions must match between developer machines and CILockfile pinning and an active or maintenance LTS Node.js version

How to configure the admin bundler in a Strapi 5 project

This sequence changes the admin build one controlled step at a time, so each alias, plugin or build option can be traced if the admin breaks. It ends with a development build and a production build that both serve a working admin with your custom code.

  1. Confirm the Node.js and Strapi baseline

    Before touching the build, confirm the Node.js version in your environment against the requirements in Strapi's installation documentation. Strapi 5 runs only on Active or Maintenance LTS Node.js versions, so check the current list rather than assuming your team's default. Record the Strapi version from package.json and the output of node --version and npm --version in your change ticket. Done means the versions are written down and the existing admin starts without errors on that baseline.

  2. Locate the admin bundler config file

    In the Strapi project, find the admin customization folder and the bundler configuration file that sits there. Strapi 5 uses Vite for the admin build by default, so the file is normally a Vite configuration. Confirm with your Strapi version's documentation whether webpack customization is still supported in the version you run, because support has changed across releases. Done means you have the exact file path open and can state which bundler the build uses.

  3. Back up the working configuration

    Copy the current bundler configuration and the admin customization entry file to a backup location or commit the working state to version control before any edit. Note the lockfile state so package versions can be restored exactly. Run a clean development build on the untouched project to confirm it passes. Done means you can restore the last working state in one step and the untouched build succeeds.

  4. Add path aliases first

    Make aliases the first change because they affect only how imports resolve and are easy to check. Add one alias for your custom admin code directory, then update one import in a single component to use it. Run the development build and confirm the component loads in the admin with no resolution errors in the terminal. Done means the alias resolves in development and the admin still shows the default pages unchanged.

  5. Change plugins and build options one at a time

    Next, add one plugin or one build option, such as a bundler plugin or an optimization setting, and make no other change in the same pass. Rebuild after each change and compare the output with the previous working build. Keep a short log of what changed and why so a regression can be traced to a single change. Done means every change has a passing build and a recorded reason, and no two untested changes are stacked together.

  6. Run the development build and check the console

    Start the admin in development mode and open it at the expected path, which is /admin unless you have changed it. Open the browser developer console and check for errors on the login page and after sign-in. Visit the content manager, the media library and the settings pages, because bundler problems often appear only on some routes. Done means the admin loads at the expected path with no console errors and your custom code renders.

  7. Run the production build and confirm the admin

    Run the production build from a clean state, removing any cached build output first so stale files do not hide a problem. Start the application in production mode and repeat the checks from the development run, including login, custom pages and installed plugins. Compare the build time and output size with the baseline you recorded so later changes can be judged against it. Done means the production admin loads at the expected path, plugins work and the build output is recorded with the configuration used.

Security and operational risks in admin build changes

Changes to the admin build run with the same trust as the admin panel itself, and they are easy to approve in review because they look like tooling. The cards below cover what a bundler change can expose, how it can pull in code you did not vet, and the checks that keep each build traceable and reversible.

Environment variables leaking into the bundle

Anything the bundler is told to inject into the admin client ends up in JavaScript that every editor's browser downloads. A custom define or envPrefix setting can pull in database credentials, API tokens or signing keys if they share a prefix with public values. Check which variables the admin config reads, and confirm that only values safe for a public browser are exposed.

Strapi SSO docs

Unvetted packages loaded through aliases

Aliases in the admin bundler config decide which file a module name resolves to, so an alias pointing at an unreviewed folder or package can silently replace a trusted dependency. This is hard to spot in a diff that only renames an import path. Review every alias target, and confirm that each one resolves to code your team has approved and tracks in version control.

Development server options in production

Options that suit a local dev server, such as permissive host allowlists, open ports, or hot-reload endpoints, can reach production if the same config file serves both builds. Keep the dev server settings behind an explicit development check, and confirm that the production build command does not start a server. Ask whether your admin build can be reached from outside the intended network.

Source maps published publicly

Source maps let anyone map minified admin code back to readable source, including custom logic and internal endpoint names. Source maps are useful for error tracking, but they should be uploaded to a private error service or omitted from the public build output. Decide the source map setting per environment and check the deployed admin folder for .map files before release.

Dependency pinning in CI

Bundler and plugin versions that float between builds can change admin output without any code change in your repository. Pin the lockfile, install with a frozen lockfile in CI, and review version bumps for the bundler and its plugins as security changes. Confirm that two builds from the same commit produce the same output so that a changed bundle always has a traceable cause.

Review, reproducibility and rollback

Treat vite.config and webpack admin config files as security-relevant code that needs a named reviewer. Build in a clean CI environment, keep the previous admin artifact available, and document how to redeploy it. Rehearse the rollback in a staging environment so that a broken admin build can be reverted without a rebuild under pressure.

How bundler changes survive Strapi 5 upgrades

Custom bundler settings sit outside the core admin code, so they are the part of an admin customization most likely to break silently when Strapi moves forward. Strapi 5 minor releases have shipped roughly weekly: v5.56.0 on September 30, 2026, v5.57.0 on October 7, 2026 and v5.58.0 on October 14, 2026, according to the GitHub release history. Treat the vite.config.ts or webpack override file as a dependency that needs review on every minor upgrade you adopt, not only on major versions. Decide up front which Strapi minor line you will follow and how often you will take it, because that cadence sets how many times per quarter the bundler config is re-checked.

Keep the override as small as possible. Every alias, plugin or build option you add is a point where a future admin change can conflict with your config. Prefer the smallest set of changes that solves the problem, such as one alias for a shared component folder, and move anything larger into application code that the admin consumes through its public extension points. Record each override in a short register kept with the repository: the setting, the file it touches, the reason it exists, the owner and the Strapi version where it was last verified. A reviewer can then decide in minutes whether an override is still needed after an upgrade.

Test the admin build after every upgrade you take, before it reaches editors. At minimum, run the production admin build, load the admin in a staging environment, and check that custom components, branding, translations and any custom plugin pages still render and that the browser console shows no build or module errors. Confirm the build time and the size of the output have not moved sharply, since a regression often appears there first. Confirm with your Strapi partner or the official upgrade notes which bundler defaults changed in the target version. Keep the previous build artifacts so you can roll back the admin separately from the database.

Limits to confirm before changing the admin bundler

Changing the admin bundler affects what the build accepts, which plugins still load and how upgrades behave. Each item below is a question to put to Strapi or to answer from your own build before you commit to a configuration.

Default bundler for the target version

Confirm which bundler the Strapi version you will run ships with by default in its admin build, and whether the customization hook you plan to use applies to that default. Check this against the release notes for the exact minor version, because Strapi 5 minor releases ship frequently and build defaults can change between them. Record the answer in your upgrade plan so a later version does not silently break your override.

Strapi releases

Webpack support for customizations

Ask Strapi whether a webpack-based customization is still supported for the version you run, and for how long. If your team already depends on a webpack configuration, confirm it still builds against the admin that version ships. A webpack setup that works today can become a maintenance cost at the next upgrade, so budget for that check when you compare options.

Plugins that depend on the build

List every installed plugin that ships admin code, and check whether each one assumes the default bundler, specific aliases or a fixed build output path. Plugins built for another bundler or a different admin layout may fail after you change the configuration. Ask each plugin maintainer for compatibility statements before you change anything, and test the admin with every plugin enabled.

Node.js version support

Confirm that the Node.js version on your build servers and in CI is an Active or Maintenance LTS release, since Strapi 5 runs only on those. Build tooling changes can also depend on the Node.js version, so pin it in your build image and record the version used for each release build. Check the installation requirements page for the exact supported versions for your Strapi release.

Installation requirements

Admin hosted separately

Find out whether your admin is served from the same host as the API or from a separate static host or CDN. A split deployment means the built admin files, asset paths and base URL must match what the static host serves, and a bundler change can alter output file names and paths. Confirm the build output directory and public path with your deployment pipeline before you alter the bundler.

Questions teams ask about Strapi admin bundler configuration

Should we switch the Strapi admin build from webpack to Vite?

Switch only if you have a reason tied to your build, and confirm that the Strapi version you run supports the bundler you choose before you change anything. Strapi 5 is the line this topic covers, and the admin build configuration is the part of the project you adjust when you need custom aliases, plugins or build options. The practical question is whether your customizations build cleanly, how long the admin build takes in your CI, and whether your team already knows Vite's configuration model. If the current build works and the team is not blocked, keeping the existing setup usually costs less than a migration. If build time, dev server reloads or a dependency conflict are slowing the team down, test the change in a branch and measure the result against your own pipeline rather than relying on general claims.

How much effort does reconfiguring a large Strapi admin customization take?

The effort depends on how much of the admin your code touches, not on the number of screens alone. The main drivers are the number of custom plugins and admin extensions that import internal modules, the aliases and path rules already in use, any custom loaders or transforms, the number of third-party admin packages with their own build assumptions, and whether the admin is served from a separate host or path. Each driver adds test cases, because a change that builds can still break a widget, a translation or a field editor at runtime. DeployOpen does not publish an effort figure for this work. Ask for a written inventory of admin extensions, build settings and integrations before you accept any estimate, and ask the provider to state which parts of the effort are discovery, configuration and regression testing.

Can our own engineers change the admin bundler configuration in-house?

Yes, if your engineers know Node.js, the Strapi project layout and the bundler you choose, and if they have a test environment that mirrors production. A small change, such as adding an alias or a branding asset path, is a reasonable in-house task for a team that reads the Strapi documentation for its version. Larger changes need more care: a build that compiles can still fail when editors open a specific content type or plugin page. Teams that do this in-house usually succeed when they keep a written list of custom admin code, run the admin in a staging environment before release, and assign one owner for upgrades. If that ownership does not exist, a partner can take the work on a fixed scope with written deliverables.

What does the team need in place before bundler work starts?

Before the work starts, the team needs a few specific things in place:

  • A Node.js version that Strapi 5 supports. Strapi runs only on Active or Maintenance LTS Node.js versions, so confirm the version against the installation requirements for your Strapi release.
  • Access to the source repository and the CI pipeline, including permission to change build steps and view build logs.
  • A non-production environment with a copy of the database or realistic seed content, so editors can test the admin in the state they use.
  • A test plan that covers login, content editing, media uploads, custom widgets and any translated labels.

Without these, the team cannot verify that the new configuration works for editors, and most delays come from missing access rather than from the configuration itself.

How do Strapi upgrades affect a custom bundler configuration?

Each Strapi upgrade can change the admin build, the dependencies it expects and the way plugins are loaded, so a custom bundler configuration needs regression testing after every upgrade. Strapi 5 ships as a series of minor releases, and the project's dependencies move with them. Pin the versions you run, keep your bundler configuration in version control, and review the release notes before you upgrade. Check whether your aliases still point to existing paths and whether your custom plugins still build. Treat the bundler file as code that has to survive upgrades, and plan the testing time for each upgrade rather than assuming the build will pass.

What does a partner quote for bundler configuration depend on?

A quote follows from the written scope, so the inputs that matter most are the ones that define that scope. Ask the provider to base the quote on the following: the Strapi version and target version, the size and type of admin customizations, whether the team wants to keep webpack or move to Vite, the number of environments to verify, the CI changes needed, and the testing and handover deliverables. Also ask who maintains the configuration after handover and whether ongoing support is a separate retainer. DeployOpen does not publish a price list, and most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. Compare quotes on the same written inventory so the numbers can be compared.

How the admin build fits into a Strapi project

The build starts in your project source, where custom admin code and plugin admin extensions sit beside the config/admin.ts file. The bundler configuration, either Vite or webpack, resolves aliases and merges your settings into the admin build, and the output is served by the Strapi server at the admin path. Only the API path carries content requests, so the check to make is which values are baked into the browser bundle at build time, because anything placed there is readable by anyone who can load the admin.

Build inputs, the browser boundary and the separate API path in a Strapi project.

Deciding whether to change the admin bundler or keep defaults

Keep the default admin build unless a specific build problem justifies changing it. Most admin customizations are light: a custom theme, a few registered plugins, a branded login page, or a small set of custom fields and widgets. Those changes are made through the admin configuration and the plugin entry points, not through the bundler, and they carry over into upgrades without any build work. If your build works, your editors can sign in, and your admin changes appear after a rebuild, a bundler change adds maintenance without adding value. Before you decide, confirm with the Strapi documentation for your installed version which admin customization points exist, since moving work out of the bundler is usually cheaper than maintaining bundler code.

Adjust aliases and build options when shared code or large plugin sets slow the build. Path aliases for shared components, a limited set of build settings, and a review of which plugins are loaded in the admin are the first steps when build times grow or import paths become hard to read. These changes are contained in one configuration file, are easy to revert, and usually survive upgrades with a short check. The cost is recurring: each alias or build option must be understood by whoever upgrades Strapi, and it must be tested after every Strapi minor release, which ship frequently. Ask whether your team has someone who will own that file for the life of the project.

Consider a custom bundler setup only when a dependency requires it. Replacing or heavily changing the build pipeline, for example to support an admin dependency that cannot be processed by the default configuration, has the highest and least predictable cost. Each change to the bundler, Vite or webpack, has to be re-verified on every Strapi upgrade, and the build tooling itself has its own release cycle. Before committing, confirm that the blocking dependency has no supported alternative, check the Strapi release notes for admin build changes, and get a written estimate from the implementation partner that covers initial work and the upgrade effort for each future Strapi release.

How DeployOpen scopes and delivers Strapi admin build work

DeployOpen plans and implements Strapi admin bundler changes inside your own infrastructure, starting from a written scope that names the Vite or webpack configuration, aliases and plugins involved. Each change is built, tested against your Strapi 5 version and documented so your team can review, run and maintain the admin build after handover.

How we scope

  • We review your Strapi 5 version, admin customizations and current bundler setup before agreeing on what changes.
  • The written scope lists each Vite or webpack setting, alias and plugin the work will touch, and what stays on the default.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before any build work starts.
  • Ask the quote to separate the bundler review from any later customization work, so each part is priced on its own.

How we build

  • Changes are made in a version-controlled copy of your Strapi project, with each bundler setting recorded in its own commit.
  • We confirm the admin still builds and loads in a staging environment that matches your production Node.js and database versions.
  • Build times and bundle output are measured before and after changes so the effect on large admin customizations is visible.
  • Aliases and plugin settings are tested against the editor screens they affect, including the content manager and media library.

How we hand over

  • You receive the configuration files, a list of every bundler change, and the reason each one was made.
  • A runbook explains how to rebuild the admin, which commands to run and what to check after a Strapi upgrade.
  • We walk your engineers through the build pipeline so they can review future changes to the admin configuration.
  • Any change that depends on Strapi internals is flagged so your team can recheck it when Strapi releases new versions.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers for teams that want the admin build kept current.
  • Retainer work can cover retesting the bundler configuration after each Strapi 5 minor release you adopt.
  • Confirm with us in the quote which Strapi versions, environments and admin changes the support covers.
  • Support requests are handled against the written scope, so changes outside it are quoted separately before work begins.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.