Skip to content

Commit

Permalink
Remove extra types
Browse files Browse the repository at this point in the history
See: #19382
  • Loading branch information
kylegach committed Oct 12, 2022
1 parent 062a92e commit af0477d
Show file tree
Hide file tree
Showing 6 changed files with 227 additions and 3,480 deletions.
11 changes: 1 addition & 10 deletions code/frameworks/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@
"import": "./dist/next-image-loader-stub.mjs",
"types": "./dist/next-image-loader-stub.d.ts"
},
"./resolved-router-context.js": {
"require": "./dist/resolved-router-context.js",
"import": "./dist/resolved-router-context.mjs",
"types": "./dist/resolved-router-context.d.ts"
},
"./package.json": "./package.json"
},
"main": "dist/index.js",
Expand Down Expand Up @@ -85,9 +80,6 @@
"@storybook/addon-actions": "7.0.0-alpha.35",
"@types/loader-utils": "^2.0.3",
"next": "^12.2.4",
"nextv10": "npm:[email protected]",
"nextv11": "npm:[email protected]",
"nextv9": "npm:[email protected]",
"typescript": "~4.6.3",
"webpack": "^5.65.0"
},
Expand Down Expand Up @@ -121,8 +113,7 @@
"./src/index.ts",
"./src/preset.ts",
"./src/preview.tsx",
"./src/next-image-loader-stub.ts",
"./src/resolved-router-context.ts"
"./src/next-image-loader-stub.ts"
],
"platform": "node"
}
Expand Down
12 changes: 0 additions & 12 deletions code/frameworks/nextjs/src/resolved-router-context.ts

This file was deleted.

5 changes: 2 additions & 3 deletions code/frameworks/nextjs/src/routing/decorator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ import * as React from 'react';
// eslint-disable-next-line import/no-extraneous-dependencies
import { action as originalAction } from '@storybook/addon-actions';
import { StoryContext } from '@storybook/addons';
import { RouterContext } from '../resolved-router-context';
// this will be aliased by webpack at runtime (this is just for typing)
import Router from './resolved-router';
import { RouterContext } from 'next/dist/shared/lib/router-context';
import Router from 'next/router';

let action: typeof originalAction;

Expand Down
10 changes: 0 additions & 10 deletions code/frameworks/nextjs/src/routing/resolved-router.ts

This file was deleted.

5 changes: 0 additions & 5 deletions code/frameworks/nextjs/src/routing/webpack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ export const configureRouting = (baseConfig: WebpackConfig): void => {
// here we resolve the router context path with the installed version of Next.js
const routerContextPath = getRouterContextPath();
addScopedAlias(baseConfig, routerContextPath);
addScopedAlias(
baseConfig,
require.resolve('@storybook/nextjs/resolved-router-context.js'),
routerContextPath
);
};

const getRouterContextPath = () => {
Expand Down
Loading

0 comments on commit af0477d

Please sign in to comment.