Commit a34766ab authored by Guy Bedford's avatar Guy Bedford Committed by Joe Haddad

gzip-size

parent 9d3b8209
import chalk from 'next/dist/compiled/chalk' 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 textTable from 'next/dist/compiled/text-table'
import path from 'path' import path from 'path'
import { isValidElementType } from 'react-is' import { isValidElementType } from 'react-is'
......
...@@ -69,7 +69,6 @@ ...@@ -69,7 +69,6 @@
"finally-polyfill": "0.1.0", "finally-polyfill": "0.1.0",
"find-up": "4.0.0", "find-up": "4.0.0",
"fork-ts-checker-webpack-plugin": "3.1.1", "fork-ts-checker-webpack-plugin": "3.1.1",
"gzip-size": "5.1.1",
"http-proxy": "1.18.0", "http-proxy": "1.18.0",
"ignore-loader": "0.1.2", "ignore-loader": "0.1.2",
"is-docker": "2.0.0", "is-docker": "2.0.0",
...@@ -193,6 +192,7 @@ ...@@ -193,6 +192,7 @@
"escape-string-regexp": "2.0.0", "escape-string-regexp": "2.0.0",
"etag": "1.8.1", "etag": "1.8.1",
"fresh": "0.5.2", "fresh": "0.5.2",
"gzip-size": "5.1.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",
......
...@@ -335,6 +335,13 @@ export async function ncc_fresh(task, opts) { ...@@ -335,6 +335,13 @@ export async function ncc_fresh(task, opts) {
.target('dist/compiled/fresh') .target('dist/compiled/fresh')
} }
// eslint-disable-next-line camelcase // 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) { 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')))
...@@ -401,6 +408,7 @@ export async function precompile(task) { ...@@ -401,6 +408,7 @@ export async function precompile(task) {
'ncc_escape_string_regexp', 'ncc_escape_string_regexp',
'ncc_etag', 'ncc_etag',
'ncc_fresh', 'ncc_fresh',
'ncc_gzip_size',
'ncc_nanoid', 'ncc_nanoid',
'ncc_resolve', 'ncc_resolve',
'ncc_text_table', 'ncc_text_table',
......
...@@ -100,6 +100,10 @@ declare module 'next/dist/compiled/fresh' { ...@@ -100,6 +100,10 @@ declare module 'next/dist/compiled/fresh' {
import m from 'fresh' import m from 'fresh'
export = m export = m
} }
declare module 'next/dist/compiled/gzip-size' {
import m from 'gzip-size'
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment