• Version 1.5.0
  • Published
  • 47.2 kB
  • 4 dependencies
  • MIT license


npm i style-resources-loader
yarn add style-resources-loader
pnpm add style-resources-loader


CSS processor resources loader for webpack



function loader

loader: loader.Loader;


    interface StyleResource

    interface StyleResource {}

      property content

      content: string;

        property file

        file: string;

          interface StyleResourcesLoaderNormalizedOptions

          interface StyleResourcesLoaderNormalizedOptions
          extends NonNullable<StyleResourcesLoaderOptions> {}

            property injector

            injector: StyleResourcesNormalizedInjector;

              property patterns

              patterns: string[];

                interface StyleResourcesLoaderOptions

                interface StyleResourcesLoaderOptions {}

                  property globOptions

                  globOptions?: glob.IOptions;

                    property injector

                    injector?: StyleResourcesInjector;

                      property patterns

                      patterns: string | string[];

                        property resolveUrl

                        resolveUrl?: boolean;

                          Type Aliases

                          type Loader

                          type Loader = loader.Loader;

                            type LoaderCallback

                            type LoaderCallback = loader.loaderCallback;

                              type LoaderContext

                              type LoaderContext = loader.LoaderContext;

                                type StyleResources

                                type StyleResources = StyleResource[];

                                  type StyleResourcesFileFormat

                                  type StyleResourcesFileFormat = 'css' | 'sass' | 'scss' | 'less' | 'styl';

                                    type StyleResourcesFunctionalInjector

                                    type StyleResourcesFunctionalInjector = (
                                    this: LoaderContext,
                                    source: string,
                                    resources: StyleResources
                                    ) => string | Promise<string>;

                                      type StyleResourcesInjector

                                      type StyleResourcesInjector =
                                      | 'prepend'
                                      | 'append'
                                      | StyleResourcesFunctionalInjector;

                                        type StyleResourcesNormalizedInjector

                                        type StyleResourcesNormalizedInjector = StyleResourcesFunctionalInjector;

                                          Package Files (3)

                                          Dependencies (4)

                                          Dev Dependencies (26)

                                          Peer Dependencies (1)


                                          To add a badge like this badgeto your package's README, use the codes available below.

                                          You may also use to create a custom badge linking to

                                          • Markdown
                                          • HTML
                                            <a href=""><img src="" alt=""></a>