Skip to content

Commit

Permalink
Merge pull request #16780 from storybookjs/tech/15336-cleanup-webpack…
Browse files Browse the repository at this point in the history
…-types

Misc: Cleanup typescript webpack types
  • Loading branch information
shilman committed Nov 25, 2021
2 parents 7856815 + bbd7262 commit 69e9742
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/angular/src/server/utils/filter-out-styling-rules.ts
@@ -1,4 +1,4 @@
import { Configuration, RuleSetRule } from 'webpack';
import type { Configuration, RuleSetRule } from 'webpack';

const isStylingRule = (rule: RuleSetRule) => {
const { test } = rule;
Expand Down
2 changes: 0 additions & 2 deletions app/react/src/typings.d.ts
@@ -1,4 +1,2 @@
declare module '@storybook/semver';
declare module 'global';
// todo check for correct types
declare module 'webpack/lib/RuleSet';
2 changes: 0 additions & 2 deletions app/vue/src/typings.d.ts
@@ -1,5 +1,3 @@
declare module 'global';
// todo check for correct types
declare module 'webpack/lib/RuleSet';

declare module 'vue-loader/lib/plugin';
2 changes: 0 additions & 2 deletions app/vue3/src/typings.d.ts
@@ -1,6 +1,4 @@
declare module 'global';
// todo check for correct types
declare module 'webpack/lib/RuleSet';

declare module 'vue-loader' {
export const VueLoaderPlugin
Expand Down
2 changes: 1 addition & 1 deletion lib/builder-webpack4/src/preview/iframe-webpack.config.ts
@@ -1,7 +1,7 @@
import path from 'path';
import { DefinePlugin, HotModuleReplacementPlugin, ProgressPlugin } from 'webpack';
// @ts-ignore
import { Configuration, RuleSetRule } from '@types/webpack';
import type { Configuration, RuleSetRule } from '@types/webpack';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin';
Expand Down
2 changes: 1 addition & 1 deletion lib/core-common/src/utils/es6Transpiler.ts
@@ -1,4 +1,4 @@
import { RuleSetRule } from 'webpack';
import type { RuleSetRule } from 'webpack';
import { getStorybookBabelConfig } from './babel';

const { plugins } = getStorybookBabelConfig();
Expand Down
2 changes: 1 addition & 1 deletion lib/manager-webpack4/src/presets/babel-loader-manager.ts
@@ -1,4 +1,4 @@
import { RuleSetRule } from 'webpack';
import type { RuleSetRule } from 'webpack';
import { getProjectRoot, getStorybookBabelConfig } from '@storybook/core-common';

export const babelLoader = () => {
Expand Down
2 changes: 1 addition & 1 deletion lib/manager-webpack5/src/presets/babel-loader-manager.ts
@@ -1,4 +1,4 @@
import { RuleSetRule } from 'webpack';
import type { RuleSetRule } from 'webpack';
import { getProjectRoot, getStorybookBabelConfig } from '@storybook/core-common';

export const babelLoader = () => {
Expand Down

0 comments on commit 69e9742

Please sign in to comment.