Skip to content

How to pass locals to loader? #13

Closed
@timofei-iatsenko

Description

@timofei-iatsenko

How to pass locals via this loader?

I need to pass object with functions, so key/value is not an option.

I've configuered loader in this way:

 { test: /\.jade$/,  loader: 'raw-loader!jade-html-loader' },

So i looking for how to pass object into it. For example:

 { test: /\.jade$/,  loader: 'raw-loader!jade-html-loader?locals=jadeLocals' },

//then somewehere in wepack config:
{
 jadeLocals: require('myObjectWithFunctions')
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions