Skip to content
This repository was archived by the owner on Oct 23, 2019. It is now read-only.
This repository was archived by the owner on Oct 23, 2019. It is now read-only.

Support loaders with object based config  #10

@james-s-turner

Description

@james-s-turner

Currently multi-loader only supports string based (sub) loaders e.g.

{
      test: /\.txt$/,
      loader: multi ('raw-loader', 'raw-loader'),
}

However the following fails:

 {
      test: /\.txt$/,
      loader: multi({loader: "raw-loader"}, {loader: "raw-loader"})
 }

with the error:
Module not found: Error: Can't resolve '[object Object]'
As mentioned: this particular example can be fixed using webpack-combine-loaders. However like @delsvr I'm trying to use ExtractTextPlugin to generate stylesheets for multiple themes

 {
      test: /\.scss$/,
      loader: multi(combineLoaders ([
            {loader: ExtractTextPlugin.extract( ... )},
            {loader: ExtractTextPlugin.extract( ... )},
       ]))
 }

This fails because combineLoaders cant transform the returned config into a query string.
This is a complete showstopper for me at the moment trying to create multiple themes.

If the multi-loader is not amenable to a solution is there any other way to achieve the desired result?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions