etag
This commit is contained in:
parent
6a8455e713
commit
fda5becf09
4 changed files with 14 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
import { IncomingMessage, ServerResponse } from 'http'
|
import { IncomingMessage, ServerResponse } from 'http'
|
||||||
import generateETag from 'etag'
|
import generateETag from 'next/dist/compiled/etag'
|
||||||
import fresh from 'fresh'
|
import fresh from 'fresh'
|
||||||
import { isResSent } from '../lib/utils'
|
import { isResSent } from '../lib/utils'
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,6 @@
|
||||||
"conf": "5.0.0",
|
"conf": "5.0.0",
|
||||||
"css-loader": "3.3.0",
|
"css-loader": "3.3.0",
|
||||||
"cssnano-simple": "1.0.0",
|
"cssnano-simple": "1.0.0",
|
||||||
"etag": "1.8.1",
|
|
||||||
"file-loader": "4.2.0",
|
"file-loader": "4.2.0",
|
||||||
"finally-polyfill": "0.1.0",
|
"finally-polyfill": "0.1.0",
|
||||||
"find-up": "4.0.0",
|
"find-up": "4.0.0",
|
||||||
|
@ -193,6 +192,7 @@
|
||||||
"dotenv": "8.2.0",
|
"dotenv": "8.2.0",
|
||||||
"dotenv-expand": "5.1.0",
|
"dotenv-expand": "5.1.0",
|
||||||
"escape-string-regexp": "2.0.0",
|
"escape-string-regexp": "2.0.0",
|
||||||
|
"etag": "1.8.1",
|
||||||
"nanoid": "2.0.3",
|
"nanoid": "2.0.3",
|
||||||
"resolve": "1.11.0",
|
"resolve": "1.11.0",
|
||||||
"taskr": "1.1.0",
|
"taskr": "1.1.0",
|
||||||
|
|
|
@ -321,6 +321,13 @@ export async function ncc_escape_string_regexp(task, opts) {
|
||||||
.target('dist/compiled/escape-string-regexp')
|
.target('dist/compiled/escape-string-regexp')
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line camelcase
|
// eslint-disable-next-line camelcase
|
||||||
|
export async function ncc_etag(task, opts) {
|
||||||
|
await task
|
||||||
|
.source(opts.src || relative(__dirname, require.resolve('etag')))
|
||||||
|
.ncc({ packageName: 'etag' })
|
||||||
|
.target('dist/compiled/etag')
|
||||||
|
}
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
export async function ncc_nanoid(task, opts) {
|
export async function ncc_nanoid(task, opts) {
|
||||||
await task
|
await task
|
||||||
.source(opts.src || relative(__dirname, require.resolve('nanoid')))
|
.source(opts.src || relative(__dirname, require.resolve('nanoid')))
|
||||||
|
@ -385,6 +392,7 @@ export async function precompile(task) {
|
||||||
'ncc_dotenv',
|
'ncc_dotenv',
|
||||||
'ncc_dotenv_expand',
|
'ncc_dotenv_expand',
|
||||||
'ncc_escape_string_regexp',
|
'ncc_escape_string_regexp',
|
||||||
|
'ncc_etag',
|
||||||
'ncc_nanoid',
|
'ncc_nanoid',
|
||||||
'ncc_resolve',
|
'ncc_resolve',
|
||||||
'ncc_text_table',
|
'ncc_text_table',
|
||||||
|
|
4
packages/next/types/misc.d.ts
vendored
4
packages/next/types/misc.d.ts
vendored
|
@ -92,6 +92,10 @@ declare module 'next/dist/compiled/escape-string-regexp' {
|
||||||
import m from 'escape-string-regexp'
|
import m from 'escape-string-regexp'
|
||||||
export = m
|
export = m
|
||||||
}
|
}
|
||||||
|
declare module 'next/dist/compiled/etag' {
|
||||||
|
import m from 'etag'
|
||||||
|
export = m
|
||||||
|
}
|
||||||
declare module 'next/dist/compiled/nanoid/index.js' {
|
declare module 'next/dist/compiled/nanoid/index.js' {
|
||||||
function nanoid(size?: number): string
|
function nanoid(size?: number): string
|
||||||
export = nanoid
|
export = nanoid
|
||||||
|
|
Loading…
Reference in a new issue