systemjs / builder

SystemJS build tool
MIT License
465 stars 122 forks source link

Bundle doesn't include package config paths (*.json files) if the absolute path contains a '(' #811

Closed rsc1975 closed 7 years ago

rsc1975 commented 7 years ago

When I created the bundle in my linux env, the resulting js file doesn't include the *.json files (package config files). I opened a Question in StackOverflow related with this issue, where I explain some details, but the problem is quite simple, my package config paths It's something like:

  packageConfigPaths: [
    "github:*/*.json",
    "npm:@angular/*.json",
    "npm:@covalent/*.json",
    "npm:*.json"
  ],

But my base directory It was something like : "/home/tomcat/.jenkins/.../My Proyect (angular2)", so after some debug, I see that the method getPackageConfigPath(packageConfigPaths, normalized) didn't return anything for the project libs (the same config worked ok in my local env), and I think that the problem is the regExp used to see if the packagename matches in the absolute path defined by packageConfigPaths section, the '(...)' in the absolute path is affecting the regExp match method.

I think that the regExp should be applied only over the packageConfigPaths values , but not on the entire absolute path, anyway I'm not sure, maybe there is a better solution.

guybedford commented 7 years ago

Thanks, fixed in https://github.com/systemjs/builder/commit/2315f5faccf819c5153b2bcf223dc3a380527742 for the next release.

guybedford commented 7 years ago

Released in 0.16.7.