Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit 9f20c09

Browse files
committed
Update documentation on reducing bundle size.
1 parent f659db4 commit 9f20c09

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

DevApp.ViewModels/Docs/GetStarted.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,3 +436,17 @@ import { Alert } from 'dotnetify-elements/components/Alert';
436436
import { TextField } from 'dotnetify-elements/components/TextField';
437437
```
438438

439+
Dependency to `moment.js` will bring all the locale files into the bundle. To include only the locales you need, set your webpack to use `ContextReplacementPlugin`:
440+
441+
```jsx
442+
const webpack = require('webpack');
443+
module.exports = {
444+
//...
445+
plugins: [
446+
// load `moment/locale/en.js` only
447+
new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /en/),
448+
],
449+
};
450+
```
451+
452+

0 commit comments

Comments
 (0)