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

gzip-size

上级 9d3b8209
import chalk from 'next/dist/compiled/chalk'
import gzipSize from 'gzip-size'
import gzipSize from 'next/dist/compiled/gzip-size'
import textTable from 'next/dist/compiled/text-table'
import path from 'path'
import { isValidElementType } from 'react-is'
......
......@@ -69,7 +69,6 @@
"finally-polyfill": "0.1.0",
"find-up": "4.0.0",
"fork-ts-checker-webpack-plugin": "3.1.1",
"gzip-size": "5.1.1",
"http-proxy": "1.18.0",
"ignore-loader": "0.1.2",
"is-docker": "2.0.0",
......@@ -193,6 +192,7 @@
"escape-string-regexp": "2.0.0",
"etag": "1.8.1",
"fresh": "0.5.2",
"gzip-size": "5.1.1",
"nanoid": "2.0.3",
"resolve": "1.11.0",
"taskr": "1.1.0",
......
......@@ -335,6 +335,13 @@ export async function ncc_fresh(task, opts) {
.target('dist/compiled/fresh')
}
// eslint-disable-next-line camelcase
export async function ncc_gzip_size(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('gzip-size')))
.ncc({ packageName: 'gzip-size' })
.target('dist/compiled/gzip-size')
}
// eslint-disable-next-line camelcase
export async function ncc_nanoid(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('nanoid')))
......@@ -401,6 +408,7 @@ export async function precompile(task) {
'ncc_escape_string_regexp',
'ncc_etag',
'ncc_fresh',
'ncc_gzip_size',
'ncc_nanoid',
'ncc_resolve',
'ncc_text_table',
......
......@@ -100,6 +100,10 @@ declare module 'next/dist/compiled/fresh' {
import m from 'fresh'
export = m
}
declare module 'next/dist/compiled/gzip-size' {
import m from 'gzip-size'
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.
先完成此消息的编辑!
想要评论请 注册