Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions docusaurus/docs/cms/admin-panel-customization/bundlers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:

<Tabs groupId="js-ts">
<TabItem value="js" label="JavaScript">
Expand Down Expand Up @@ -118,4 +123,3 @@ export default (config, webpack) => {

</TabItem>
</Tabs>