npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@component-controls/webpack-configs

v4.0.3

Published

Webpack preset configurations

Downloads

79

Readme

Table of contents

Overview

Collection of standard webpack rules for @component-controls/instrument.

Installation

$ npm install @component-controls/webpack-configs --save-dev

Usage

in .storybook/main.js

Basic usage

addons: [
    ...
    {
      name: '@component-controls/storybook',
      options: {
        webpack: ['react-docgen-typescript']
      }
    }
  ],

Advanced usage

addons: [
  ...
  {
    name: '@component-controls/storybook',
    options: {
      webpack: [
        'instrument',
        {
          name: 'react-docgen-typescript',
          config: {
            module: {
              rules: [
                {
                  loader: '@component-controls/loader/loader',
                  options: {
                    //instrumentation options
                    prettier: {
                      tabWidth: 4,
                    },
                  },
                },
              ],
            },
          },
        },
      ],
    }
  }],

API

getWebpackConfig

function

expands the presets into webpack config

defined in @component-controls/webpack-configs/core/webpack-configs/src/index.ts

parameters

| Name | Type | Description | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | | presets* | RuleType[] | custom config | | options* | BuildPropswebpack: Configuration | WebpackConfigFnfinalWebpack: Configuration | WebpackConfigFnpresets: RuleTypesconfigPath: stringdistFolder: stringbundleName: stringstaticFolder: stringcssFileName: stringlogOptions: Partial<LogOptions>mode: "none" | "development" | "production"loadersencodeHTML*: encodeHTMLat*: function (index*: ) => T | undefinedmodule: stringident: stringloader: stringoptions: string | type | | | returns | WebpackConfigurationamd: false | typebail: booleancache: boolean | MemoryCacheOptions | FileCacheOptionscontext: stringdependencies: string[]devtool: string | falseentry: string | function | EntryObject | string[]experimentsasyncWebAssembly: booleanbackCompat: booleancacheUnaffected: booleancss: booleanfutureDefaults: booleanlayers: booleanoutputModule: booleansyncWebAssembly: booleantopLevelAwait: booleanbuildHttp: HttpUriOptions | ((string, RegExp, function))[]lazyCompilation: boolean | LazyCompilationOptionsexternalsbyLayer: type | functionexternalsPresetselectron: booleanelectronMain: booleanelectronPreload: booleanelectronRenderer: booleannode: booleannwjs: booleanweb: booleanwebAsync: booleanexternalsType: "var" | "module" | "assign" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "promise" | "import" | "script" | "node-commonjs"ignoreWarnings: ((RegExp, type, function))[]infrastructureLoggingappendOnly: booleancolors: booleanconsole: Consoledebug: string | boolean | RegExp | FilterItemTypes[] | functionlevel: "none" | "error" | "warn" | "info" | "log" | "verbose"stream: NodeJS.WritableStreamloader[string]: anymode: "none" | "development" | "production"moduledefaultRules: ((RuleSetRule, string))[]exprContextCritical: booleanexprContextRecursive: booleanexprContextRegExp: boolean | RegExpexprContextRequest: stringgeneratorasset*: asset/inline*: asset/resource*: javascript*: javascript/auto*: javascript/dynamic*: javascript/esm*: noParse: string | Function | RegExp | ((string, Function, RegExp))[]parserasset*: asset/inline*: asset/resource*: asset/source*: javascript*: javascript/auto*: javascript/dynamic*: javascript/esm*: rules: ((RuleSetRule, string))[]strictExportPresence: booleanstrictThisContextOnImports: booleanunknownContextCritical: booleanunknownContextRecursive: booleanunknownContextRegExp: boolean | RegExpunknownContextRequest: stringunsafeCache: boolean | FunctionwrappedContextCritical: booleanwrappedContextRecursive: booleanwrappedContextRegExp: RegExpname: stringnode: false | NodeOptionsoptimizationcheckWasmTypes: booleanchunkIds: false | "natural" | "named" | "deterministic" | "size" | "total-size"concatenateModules: booleanemitOnErrors: booleanflagIncludedChunks: booleaninnerGraph: booleanmangleExports: boolean | "deterministic" | "size"mangleWasmImports: booleanmergeDuplicateChunks: booleanminimize: booleanminimizer: ((function, WebpackPluginInstance, string))[]moduleIds: false | "natural" | "named" | "deterministic" | "size" | "hashed"noEmitOnErrors: booleannodeEnv: string | falseportableRecords: booleanprovidedExports: booleanrealContentHash: booleanremoveAvailableModules: booleanremoveEmptyChunks: booleanruntimeChunk: boolean | "single" | "multiple" | typesideEffects: boolean | "flag"splitChunks: false | OptimizationSplitChunksOptionsusedExports: boolean | "global"outputassetModuleFilename: string | functionasyncChunks: booleanauxiliaryComment: string | LibraryCustomUmdCommentObjectcharset: booleanchunkFilename: string | functionchunkFormat: string | falsechunkLoadTimeout: numberchunkLoading: string | falsechunkLoadingGlobal: stringclean: boolean | CleanOptionscompareBeforeEmit: booleancrossOriginLoading: false | "anonymous" | "use-credentials"cssChunkFilename: string | functioncssFilename: string | functiondevtoolFallbackModuleFilenameTemplate: string | FunctiondevtoolModuleFilenameTemplate: string | FunctiondevtoolNamespace: stringenabledChunkLoadingTypes: string[]enabledLibraryTypes: string[]enabledWasmLoadingTypes: string[]environment: Environmentfilename: string | functionglobalObject: stringhashDigest: stringhashDigestLength: numberhashFunction: string | hashSalt: stringhotUpdateChunkFilename: stringhotUpdateGlobal: stringhotUpdateMainFilename: stringiife: booleanimportFunctionName: stringimportMetaName: stringlibrary: string | string[] | LibraryOptions | LibraryCustomUmdObjectlibraryExport: string | string[]libraryTarget: stringmodule: booleanpath: stringpathinfo: boolean | "verbose"publicPath: string | functionscriptType: false | "module" | "text/javascript"sourceMapFilename: stringsourcePrefix: stringstrictModuleErrorHandling: booleanstrictModuleExceptionHandling: booleantrustedTypes: string | true | TrustedTypesumdNamedDefine: booleanuniqueName: stringwasmLoading: string | falsewebassemblyModuleFilename: stringworkerChunkLoading: string | falseworkerWasmLoading: string | falseparallelism: numberperformance: false | PerformanceOptionsplugins: ((function, WebpackPluginInstance))[]profile: booleanrecordsInputPath: string | falserecordsOutputPath: string | falserecordsPath: string | falseresolvealias: type[] | typealiasFields: ((string, string[]))[]byDependency[string]: ResolveOptionsWebpackOptionscache: booleancachePredicate: function (request*: ) => booleancacheWithContext: booleanconditionNames: string[]descriptionFiles: string[]enforceExtension: booleanexportsFields: string[]extensions: string[]fallback: type[] | typefileSystem: InputFileSystemfullySpecified: booleanimportsFields: string[]mainFields: ((string, string[]))[]mainFiles: string[]modules: string[]plugins: ((ResolvePluginInstance, string))[]preferAbsolute: booleanpreferRelative: booleanresolver: Resolverrestrictions: ((string, RegExp))[]roots: string[]symlinks: booleanunsafeCache: boolean | typeuseSyncFileSystemCalls: booleanresolveLoaderalias: type[] | typealiasFields: ((string, string[]))[]byDependency[string]: ResolveOptionsWebpackOptionscache: booleancachePredicate: function (request*: ) => booleancacheWithContext: booleanconditionNames: string[]descriptionFiles: string[]enforceExtension: booleanexportsFields: string[]extensions: string[]fallback: type[] | typefileSystem: InputFileSystemfullySpecified: booleanimportsFields: string[]mainFields: ((string, string[]))[]mainFiles: string[]modules: string[]plugins: ((ResolvePluginInstance, string))[]preferAbsolute: booleanpreferRelative: booleanresolver: Resolverrestrictions: ((string, RegExp))[]roots: string[]symlinks: booleanunsafeCache: boolean | typeuseSyncFileSystemCalls: booleansnapshotbuildDependencieshash*: timestamp*: immutablePaths: ((string, RegExp))[]managedPaths: ((string, RegExp))[]modulehash*: timestamp*: resolvehash*: timestamp*: resolveBuildDependencieshash*: timestamp*: stats: boolean | StatsOptions | "none" | "verbose" | "summary" | "errors-only" | "errors-warnings" | "minimal" | "normal" | "detailed"target: string | false | string[]watch: booleanwatchOptionsaggregateTimeout: numberfollowSymlinks: booleanignored: string | RegExp | string[]poll: number | booleanstdin: booleandevServer: WebpackDevServer.Configuration | undefined | Options object as provided by the user. |

deepMergeWebpackConfig

function

deep merge two webpack configurations

defined in @component-controls/webpack-configs/core/webpack-configs/src/index.ts

parameters

| Name | Type