Skip to content

Commit

Permalink
fix(kit): temporarily inline lodash.template from lodash-es (#20892)
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonpinto committed Jun 5, 2023
1 parent 67f2232 commit 0f4ae15
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 38 deletions.
3 changes: 2 additions & 1 deletion packages/kit/build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ export default defineBuildConfig({
'webpack',
'vite',
'h3'
]
],
failOnWarn: false
})
4 changes: 2 additions & 2 deletions packages/kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"ignore": "^5.2.4",
"jiti": "^1.18.2",
"knitwork": "^1.0.0",
"lodash.template": "^4.5.0",
"mlly": "^1.3.0",
"pathe": "^1.1.1",
"pkg-types": "^1.0.3",
Expand All @@ -41,8 +40,9 @@
},
"devDependencies": {
"@types/hash-sum": "1.0.0",
"@types/lodash.template": "4.5.1",
"@types/lodash-es": "^4.17.7",
"@types/semver": "7.5.0",
"lodash-es": "^4.17.21",
"nitropack": "2.4.1",
"unbuild": "latest",
"vite": "4.3.9",
Expand Down
3 changes: 2 additions & 1 deletion packages/kit/src/internal/template.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { promises as fsp } from 'node:fs'
import lodashTemplate from 'lodash.template'
// TODO: swap out when https://github.com/lodash/lodash/pull/5649 is merged
import { template as lodashTemplate } from 'lodash-es'
import { genDynamicImport, genImport, genSafeVariableName } from 'knitwork'

import type { NuxtTemplate } from '@nuxt/schema'
Expand Down
2 changes: 1 addition & 1 deletion packages/schema/src/config/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default defineUntypedSchema({
* You can provide your own templates which will be rendered based
* on Nuxt configuration. This feature is specially useful for using with modules.
*
* Templates are rendered using [`lodash.template`](https://lodash.com/docs/4.17.15#template).
* Templates are rendered using [`lodash/template`](https://lodash.com/docs/4.17.15#template).
*
* @example
* ```js
Expand Down
42 changes: 9 additions & 33 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0f4ae15

Please sign in to comment.