Skip to content

Optimizing packages with names containing a "/" #725

@KidkArolis

Description

@KidkArolis

I was wondering if you'd consider fixing the issue where currently package names with a slash, e.g. "@foo/bar" don't get optimized like other packages.

Scoped packages is a new feature in npm, and "@foo/bar" is a valid package name in npm from now on. We're building something on top of npm and require.js and our config looks like this at the moment:

packages: [{
  name: "@foo/bar@1.0.0",
  main: "index",
  location: "@foo/bar@1.0.0"
}, {
  name: "baz@2.0.0",
  main: "index",
  location: "baz@2.0.0"
}]

However, after optimization, baz package is optimized as expected, but optimizing @foo/bar doesn't work the same way. In particular, in the output we get something like

define("baz@2.0.0/index", [], function () {...});
define("baz@2.0.0", ["baz@2.0.0/index"], function (main) {return main;});
define("@foo/bar@1.0.0/index", [], function () {...});

What's missing there is

define("@foo/bar@1.0.0", ["@foo/bar@1.0.0/index"], function (main) { return main; });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy