New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wildcards do not match nested paths #223

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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Show comment
Hide comment
@guybedford

guybedford Jul 11, 2015

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@nathanboktae

nathanboktae 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.

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

This comment has been minimized.

Show comment
Hide comment
@guybedford

guybedford Jul 12, 2015

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@nathanboktae

nathanboktae 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?

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

This comment has been minimized.

Show comment
Hide comment
Member

guybedford commented Jul 13, 2015

@guybedford

This comment has been minimized.

Show comment
Hide comment
@guybedford

guybedford Jul 13, 2015

Member

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

Member

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 join this conversation on GitHub. Already have an account? Sign in to comment