Skip to content
This repository has been archived by the owner. It is now read-only.

Wildcards do not match nested paths #223

Closed
nathanboktae opened this issue Jul 10, 2015 · 6 comments
Closed

Wildcards do not match nested paths #223

nathanboktae opened this issue Jul 10, 2015 · 6 comments

Comments

@nathanboktae
Copy link

@nathanboktae nathanboktae commented Jul 10, 2015

In my paths map, I have this map:

  "*.tpl.js": "dist/*.tpl.js"

which matches a top level module fine (body.tpl.js), but cannot match a nested one (login/login.tpl.js).

SystemJS in the browser properly matches these paths and loads the app just fine.

I am using SystemJS 0.18 and SystemJS builder 0.12

All path maps:

{
  "paths": {
    "app/*": "src/app/*.js",
    "*.tpl.js": "dist/*.tpl.js",
    "github:*": "jspm_packages/github/*.js",
    "npm:*": "jspm_packages/npm/*.js",
    "bower:*": "jspm_packages/bower/*.js"
  }
}
@guybedford
Copy link
Member

@guybedford guybedford commented Jul 11, 2015

Yes, using paths for adding extensions is no longer recommended for this reason. Note that jspm 0.16 beta should be used for this version of SystemJS which will remove the extensions from the npm, github and bower paths.

@nathanboktae
Copy link
Author

@nathanboktae nathanboktae commented Jul 11, 2015

It's not adding an extension. It's mapping a file pattern to a nested path. These are template files processed for angular template caching.

But the bigger problem is that this works fine in the browser, but doesn't in the builder. The #1 goal if the builder is config.js that works in the browser will always work with builder. That was my experience with r.js. that is frictionless package management.

@guybedford
Copy link
Member

@guybedford guybedford commented Jul 12, 2015

Yes, this nested path extension issue is exactly why jspm 0.16 beta doesn't use the extension forms "github:*": "jspm_packages/github/*.js".

This definitely won't work with SystemJS 0.18 in the browser. Only SystemJS 0.16 or lower.

@nathanboktae
Copy link
Author

@nathanboktae nathanboktae commented Jul 12, 2015

This definitely won't work with SystemJS 0.18 in the browser

Just confirmed that's the case. What's the reason for this regression in functionality?

@guybedford
Copy link
Member

@guybedford guybedford commented Jul 13, 2015

Closing, but please let me know if you have any further feedback or questions at all.

@guybedford guybedford closed this Jul 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.