Skip to content
This repository was archived by the owner on Mar 26, 2018. It is now read-only.

Suggestion: Modify a separate config object #38

@marrs

Description

@marrs

I see from the docs that this plugin modifies the current requirejs.config (if present) and tries to be non-destructive about how it does that. This means, amongst other things, that if you remove a package from bower, it won't be removed from the config.

Can I suggest a different approach: modify a separate config that the user then overrides.

var autoConfig = {
  paths: {
    // This always maps directly to whatever
    // components are installed via bower.
  }
}

require.config(extend(autoConfig, {
  // My rules go here.
}));

This ways it's obvious what grunt is in control of and what I the developer am in control of.

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