Skip to content

Commit

Permalink
Merge pull request #262 from cellador/patch-1
Browse files Browse the repository at this point in the history
docs(project): Update lazy loading example to reflect 3.x.x migration
  • Loading branch information
MrWook authored Sep 30, 2024
2 parents b7c642f + 17d30cf commit a3507b8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/guide/lazy-loading/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ This is how you lazy load dictionaries:

```js
const loadOptions = async () => {
const zxcvbnCommonPackage = await import(
const { dictionary: commonDict, adjacencyGraphs } = await import(
/* webpackChunkName: "zxcvbnCommonPackage" */ '@zxcvbn-ts/language-common'
)
const zxcvbnEnPackage = await import(
const { dictionary: enDict, translations } = await import(
/* webpackChunkName: "zxcvbnEnPackage" */ '@zxcvbn-ts/language-en'
)

return {
dictionary: {
...zxcvbnCommonPackage.default.dictionary,
...zxcvbnEnPackage.default.dictionary,
...commonDict,
...enDict,
},
graphs: zxcvbnCommonPackage.default.adjacencyGraphs,
translations: zxcvbnEnPackage.default.translations,
graphs: adjacencyGraphs,
translations: translations,
}
}
```
Expand Down

0 comments on commit a3507b8

Please sign in to comment.