提交 4a37263e 编写于 作者: G Guy Bedford 提交者: Joe Haddad

lru-cache

上级 4adf4b33
import fs from 'fs'
import LRUCache from 'lru-cache'
import LRUCache from 'next/dist/compiled/lru-cache'
import path from 'path'
import { promisify } from 'util'
import { PrerenderManifest } from '../../build'
......
......@@ -72,7 +72,6 @@
"ignore-loader": "0.1.2",
"jest-worker": "24.9.0",
"loader-utils": "2.0.0",
"lru-cache": "5.1.1",
"mini-css-extract-plugin": "0.8.0",
"native-url": "0.2.6",
"node-fetch": "2.6.0",
......@@ -193,6 +192,7 @@
"jsonwebtoken": "8.5.1",
"launch-editor": "2.2.1",
"lodash.curry": "4.1.1",
"lru-cache": "5.1.1",
"nanoid": "2.0.3",
"resolve": "1.11.0",
"taskr": "1.1.0",
......
......@@ -394,6 +394,13 @@ export async function ncc_lodash_curry(task, opts) {
.target('dist/compiled/lodash.curry')
}
// eslint-disable-next-line camelcase
export async function ncc_lru_cache(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('lru-cache')))
.ncc({ packageName: 'lru-cache' })
.target('dist/compiled/lru-cache')
}
// eslint-disable-next-line camelcase
export async function ncc_nanoid(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('nanoid')))
......@@ -468,6 +475,7 @@ export async function precompile(task) {
'ncc_jsonwebtoken',
'ncc_launch_editor',
'ncc_lodash_curry',
'ncc_lru_cache',
'ncc_nanoid',
'ncc_resolve',
'ncc_text_table',
......
......@@ -132,6 +132,10 @@ declare module 'next/dist/compiled/lodash.curry' {
import m from 'lodash.curry'
export = m
}
declare module 'next/dist/compiled/lru-cache' {
import m from 'lru-cache'
export = m
}
declare module 'next/dist/compiled/nanoid/index.js' {
function nanoid(size?: number): string
export = nanoid
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册