Skip to content

Commit

Permalink
Adapt next-server refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ofhouse committed Aug 17, 2021
1 parent 4b7247c commit 7115a11
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
5 changes: 1 addition & 4 deletions lib/handler.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
ImageConfig,
imageConfigDefault,
} from 'next/dist/next-server/server/image-config';
import { ImageConfig, imageConfigDefault } from 'next/dist/server/image-config';
import { parse as parseUrl } from 'url';
import {
APIGatewayProxyEventV2,
Expand Down
8 changes: 4 additions & 4 deletions lib/image-optimizer.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { IncomingMessage, ServerResponse } from 'http';
import { ImageConfig } from 'next/dist/next-server/server/image-config';
import { NextConfig } from 'next/dist/next-server/server/config';
import { imageOptimizer as nextImageOptimizer } from 'next/dist/next-server/server/image-optimizer';
import Server from 'next/dist/next-server/server/next-server';
import { ImageConfig } from 'next/dist/server/image-config';
import { NextConfig } from 'next/dist/server/config';
import { imageOptimizer as nextImageOptimizer } from 'next/dist/server/image-optimizer';
import Server from 'next/dist/server/next-server';
import nodeFetch, { RequestInfo, RequestInit } from 'node-fetch';
import { UrlWithParsedQuery } from 'url';
import S3 from 'aws-sdk/clients/s3';
Expand Down
2 changes: 1 addition & 1 deletion scripts/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async function main() {

fileList.push(
...glob.sync(
'node_modules/next/dist/next-server/server/lib/squoosh/**/*.{js,wasm}',
'node_modules/next/dist/server/lib/squoosh/**/*.{js,wasm}',
{
cwd: workspaceRoot,
}
Expand Down
5 changes: 1 addition & 4 deletions test/image-optimizer.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/// <reference types="jest-file-snapshot" />

import {
ImageConfig,
imageConfigDefault,
} from 'next/dist/next-server/server/image-config';
import { ImageConfig, imageConfigDefault } from 'next/dist/server/image-config';
import S3 from 'aws-sdk/clients/s3';
import * as path from 'path';

Expand Down
2 changes: 1 addition & 1 deletion test/utils/run-optimizer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fork } from 'child_process';
import getPort from 'get-port';
import { ImageConfig } from 'next/dist/next-server/server/image-config';
import { ImageConfig } from 'next/dist/server/image-config';
import fetch from 'node-fetch';
import { createRequest, createResponse } from 'node-mocks-http';
import { EventEmitter } from 'events';
Expand Down

0 comments on commit 7115a11

Please sign in to comment.