Skip to content

Commit 49a15fb

Browse files
committed
docs(bundlers): clarify webpack config example rename and JS/TS filenames
1 parent 0008696 commit 49a15fb

File tree

1 file changed

+7
-3
lines changed
  • docusaurus/docs/cms/admin-panel-customization

1 file changed

+7
-3
lines changed

docusaurus/docs/cms/admin-panel-customization/bundlers.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,15 @@ strapi develop --bundler=webpack
8080
```
8181

8282
:::prerequisites
83-
Make sure to rename the default `webpack.config.example.js` file into `webpack.config.` before customizing webpack.
83+
If you plan to customize webpack, start from the example file in your project root. Rename:
84+
85+
- `webpack.config.example.js``webpack.config.js` (JavaScript)
86+
- or `webpack.config.example.ts``webpack.config.ts` (TypeScript)
87+
88+
Strapi will pick up `webpack.config.js` or `webpack.config.ts` automatically when you run `strapi develop --bundler=webpack`.
8489
:::
8590

86-
In order to extend the usage of webpack v5, define a function that extends its configuration inside `/src/admin/webpack.config.`:
91+
To extend webpack v5, define a function that returns a modified config in `/src/admin/webpack.config.js` or `/src/admin/webpack.config.ts`:
8792

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

119124
</TabItem>
120125
</Tabs>
121-

0 commit comments

Comments
 (0)