Closed MeoMix closed 8 years ago
Thanks, I've just updated the description to exclude assuming the solution.
Hello,
I have a similar issue here using @empty
, and it seems closely related (if it isn't, LMK and I'll create another). I want to use alasql
but don't need the xlsjs
and xlsx
dependencies anywhere. So I wrote in my package.json
:
"jspm": {
"dependencies": {
"alasql": "npm:alasql@0.2.5"
},
"overrides": {
"alasql@0.2.5": {
"map": {
"xlsjs": "@empty",
"xlsx": "@empty"
}
}
}
}
However, this seems to be ignored by jspm
, as the xls*
packages and all their dependencies are downloaded and resolved in jspm.config.js
. If I manually uninstall them and then manually edit jspm.config.js
to replace references to xlsjs
and xlsx
by @empty
, everything works. But I understand (correct me if I am wrong) one should expect the @empty
-ed packages not to be downloaded / resolved / linked at all. Or at least that's what I would expect!
Thanks in advance for looking into this.
We don't actually skip downloading for empty packages by default. Rather you need to also set the dependencies to object to exclude the dependencies.
Ok thanks, I'll keep my comments regarding download for a new issue then, to avoid polluting this one *.
Independently of the fact that the packages are downloaded or not, do you confirm that, in the above case, the "xlsjs" and "xlsx" should be absent from the packages in "jspm.config.js" (and marked as @empty
in the alasql
package) after jspm install
? If not then I haven't understood a thing about overrides and @empty
!
* EDIT: Thanks to your reply I've actually found that using jspm.overrides["alasql@0.2.5"].dependencies = {}
achieved what I wanted to do. The reason I thought @empty
-ed packages should not be downloaded came from #77 and fa4be763c19f. Thanks again, I'm slowly getting to understand how things work in jspm!
@tkhyn sure, glad to hear that. Yes there are a lot of complexities to handling this "interoperability" layer with existing ecosystems. Hopefully we can get the docs up to a level in due course to explain all these intricacies properly.
Ref: https://github.com/jspm/jspm-cli/issues/1611
I put:
I expect cssnano to resolve to empty in the browser, but instead, I get the following:
which still resolves cssnano to the full package.