Skip to content

Doesn't honor the removeCombined option when optimizing with r.js #33

Open

Description

@peol

I'd love for the text plugin to clean up inlined text modules when optimized. I'd love to take a swing at this (I hacked it locally by caching the file on the node process object and fetch from that cache (unlinking the file once it's cached) but I'm seeing an issue with all require plugins. There's no easy way to add support for these plugins, I haven't looked too closely at the current code in require.js but if there's a possibility to add an hook for this that would be awesome.

Maybe this issue should be solved in require.js core first, and solved here later--but I'd love to hear your thoughts, @jrburke.

Activity

  1. jrburke commented on Jan 12, 2013

    @jrburke
    Member

    This does seem like a core issue. Specifically, I think there should be a loader plugin API for this, similar in some ways to writeFile. Maybe removeFile(). I opened requirejs/r.js#344 to track this, since the bulk of the change will be in the optimizer. Comment in that bug to add more to the idea or to reference if you want to try a patch.

    Putting that ticket in consideration for 2.1.4, the release after the next release. However, it may be pushed later after it is given more though.

    Once that ticket is addressed, we can use this ticket to track a change in text.js itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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