Commit 5da7d9ed authored by Guy Bedford's avatar Guy Bedford Committed by Joe Haddad

http-proxy

parent a34766ab
import compression from 'next/dist/compiled/compression' import compression from 'next/dist/compiled/compression'
import fs from 'fs' import fs from 'fs'
import { IncomingMessage, ServerResponse } from 'http' import { IncomingMessage, ServerResponse } from 'http'
import Proxy from 'http-proxy' import Proxy from 'next/dist/compiled/http-proxy'
import nanoid from 'next/dist/compiled/nanoid/index.js' import nanoid from 'next/dist/compiled/nanoid/index.js'
import { join, relative, resolve, sep } from 'path' import { join, relative, resolve, sep } from 'path'
import { parse as parseQs, ParsedUrlQuery } from 'querystring' import { parse as parseQs, ParsedUrlQuery } from 'querystring'
......
...@@ -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",
"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",
"is-wsl": "2.1.1", "is-wsl": "2.1.1",
...@@ -193,6 +192,7 @@ ...@@ -193,6 +192,7 @@
"etag": "1.8.1", "etag": "1.8.1",
"fresh": "0.5.2", "fresh": "0.5.2",
"gzip-size": "5.1.1", "gzip-size": "5.1.1",
"http-proxy": "1.18.0",
"nanoid": "2.0.3", "nanoid": "2.0.3",
"resolve": "1.11.0", "resolve": "1.11.0",
"taskr": "1.1.0", "taskr": "1.1.0",
......
...@@ -342,6 +342,13 @@ export async function ncc_gzip_size(task, opts) { ...@@ -342,6 +342,13 @@ export async function ncc_gzip_size(task, opts) {
.target('dist/compiled/gzip-size') .target('dist/compiled/gzip-size')
} }
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
export async function ncc_http_proxy(task, opts) {
await task
.source(opts.src || relative(__dirname, require.resolve('http-proxy')))
.ncc({ packageName: 'http-proxy' })
.target('dist/compiled/http-proxy')
}
// 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')))
...@@ -409,6 +416,7 @@ export async function precompile(task) { ...@@ -409,6 +416,7 @@ export async function precompile(task) {
'ncc_etag', 'ncc_etag',
'ncc_fresh', 'ncc_fresh',
'ncc_gzip_size', 'ncc_gzip_size',
'ncc_http_proxy',
'ncc_nanoid', 'ncc_nanoid',
'ncc_resolve', 'ncc_resolve',
'ncc_text_table', 'ncc_text_table',
......
...@@ -104,6 +104,10 @@ declare module 'next/dist/compiled/gzip-size' { ...@@ -104,6 +104,10 @@ declare module 'next/dist/compiled/gzip-size' {
import m from 'gzip-size' import m from 'gzip-size'
export = m export = m
} }
declare module 'next/dist/compiled/http-proxy' {
import m from 'http-proxy'
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