8000 docs: update references to `lodash` and recommend `es-toolkit` · nuxt/nuxt@8e2ca5b · GitHub
[go: up one dir, main page]

Skip to content

Commit 8e2ca5b

Browse files
committed
docs: update references to lodash and recommend es-toolkit
1 parent 10f19f1 commit 8e2ca5b

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

docs/1.getting-started/12.upgrade.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -660,11 +660,11 @@ We have raised PRs to update modules using EJS syntax, but if you need to do thi
660660

661661
* Moving your string interpolation logic directly into `getContents()`.
662662
* Using a custom function to handle the replacement, such as in https://github.com/nuxt-modules/color-mode/pull/240.
663-
* Continuing to use `lodash`, as a dependency of _your_ project rather than Nuxt:
663+
* Use `es-toolkit/compat` (a drop-in replacement for lodash template), as a dependency of _your_ project rather than Nuxt:
664664

665665
```diff
666666
+ import { readFileSync } from 'node:fs'
667-
+ import { template } from 'lodash-es'
667+
+ import { template } from 'es-toolkit/compat'
668668
// ...
669669
addTemplate({
670670
fileName: 'appinsights-vue.js'

packages/schema/src/config/build.ts

+1-7
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,14 @@ export default defineUntypedSchema({
8585
},
8686

8787
/**
88-
* You can provide your own templates which will be rendered based
89-
* on Nuxt configuration. This feature is specially useful for using with modules.
88+
* It is recommended to use `addTemplate` from `@nuxt/kit` instead of this option.
9089
*
91-
* Templates are rendered using [`lodash/template`](https://lodash.com/docs/4.17.15#template).
9290
* @example
9391
* ```js
9492
* templates: [
9593
* {
9694
* src: '~/modules/support/plugin.js', // `src` can be absolute or relative
9795
* dst: 'support.js', // `dst` is relative to project `.nuxt` dir
98-
* options: {
99-
* // Options are provided to template as `options` key
100-
* live_chat: false
101-
* }
10296
* }
10397
* ]
10498
* ```

0 commit comments

Comments
 (0)
0