diff --git a/docusaurus/docs/cms/admin-panel-customization/bundlers.md b/docusaurus/docs/cms/admin-panel-customization/bundlers.md index 81b485a2db..25ebf19dc1 100644 --- a/docusaurus/docs/cms/admin-panel-customization/bundlers.md +++ b/docusaurus/docs/cms/admin-panel-customization/bundlers.md @@ -80,10 +80,15 @@ strapi develop --bundler=webpack ``` :::prerequisites -Make sure to rename the default `webpack.config.example.js` file into `webpack.config.` before customizing webpack. +If you plan to customize webpack, start from the example file in your project root. Rename: + +- `webpack.config.example.js` → `webpack.config.js` (JavaScript) +- or `webpack.config.example.ts` → `webpack.config.ts` (TypeScript) + +Strapi will pick up `webpack.config.js` or `webpack.config.ts` automatically when you run `strapi develop --bundler=webpack`. ::: -In order to extend the usage of webpack v5, define a function that extends its configuration inside `/src/admin/webpack.config.`: +To extend webpack v5, define a function that returns a modified config in `/src/admin/webpack.config.js` or `/src/admin/webpack.config.ts`: @@ -118,4 +123,3 @@ export default (config, webpack) => { -