import Intro from '/docs/snippets/breaking-change-page-intro.md'
import MigrationIntro from '/docs/snippets/breaking-change-page-migration-intro.md'
Webpack Aliases are removed#
In Strapi v5, webpack aliases are removed ensuring better compatibility and reduced dependency conflicts.
Breaking change description#
In Strapi v4
Strapi maintains a specific list of dependencies that are aliased in webpack configuration. This ensures that plugins consistently use Strapi versions of certain libraries like the design-system.
In Strapi 5
The aliasing process is simplified. Only essential dependencies like react, react-dom, react-router-dom, and styled-components are aliased.
Migration#
Notes#
-
If you encounter issues with 3rd-party plugins, it's recommended you open an issue on the respective plugin's repository. Encourage the plugin maintainers to add their dependencies to their
package.jsonfile to resolve compatibility issues. -
If you encounter issues with local plugins, you can fix them by amending the
resolveoption in your chosen bundler.
Manual procedure#
To migrate to Strapi 5:
- Identify any configuration files (e.g., webpack configuration) that referenced the now-removed Webpack aliases in Strapi v4.
- Ensure that any references to Webpack aliases in the code are replaced with appropriate imports or paths.
- If third-party plugins are used in the project, verify that they do not rely on Webpack aliases that are no longer present in Strapi v5.
- If necessary, communicate with the plugin authors to update their dependencies or configurations accordingly.