Options
All
  • Public
  • Public/Protected
  • All
Menu

gatsby-plugin-tsconfig-paths

Index

Type aliases

WebpackConfigFn

WebpackConfigFn: (args: CreateWebpackConfigArgs, options?: PluginOptions & GatsbyPluginOptions, callback?: PluginCallback) => void

Same interface that gatsby uses for the onCreateWebpackConfig() function

Type declaration

    • (args: CreateWebpackConfigArgs, options?: PluginOptions & GatsbyPluginOptions, callback?: PluginCallback): void
    • Parameters

      • args: CreateWebpackConfigArgs
      • Optional options: PluginOptions & GatsbyPluginOptions
      • Optional callback: PluginCallback

      Returns void

Variables

Const ValidPluginOptions

ValidPluginOptions: string[] = keys<TsconfigPathsOptions>() as string[]

Functions

Const onCreateWebpackConfig

  • onCreateWebpackConfig(__namedParameters: { actions: Actions }, pluginOptions?: PluginOptions): void
  • Sets up the webpack configuration to use tsconfig-paths-webpack-plugin, which will add aliases for webpack that will match what is found in the tsconfig.json.

    Parameters

    • __namedParameters: { actions: Actions }
      • actions: Actions
    • Optional pluginOptions: PluginOptions

      The plugin options defined by the user

    Returns void

Const resolvableExtensions

  • resolvableExtensions(): string[]
  • These are the lists of extensions for this plugin to process Currently, it is processing all typescript and javascript, since that is assumed to be how typescript will be loaded by Gatsby.

    The extensions option of of this plugin should match the general webpack resolution.

    • References: ['.ts', '.tsx', '.js', '.jsx']

    Returns string[]

    Array of valid file extensions