Closed AdamWillden closed 7 years ago
Please excuse the ping ahmed, I'm in a rather desperate situation (https://github.com/jspm/jspm-cli/issues/2252) so am exploring all options.
@ahmedshuhel Can you take a look at this?
@AdamWillden @EisenbergEffect Will look into it tonight.
@EisenbergEffect @ahmedshuhel I've just realised I completely missed whats happening and where the main bug with bundling lies and it's not the dependency version.
See this section of code in the config-serializer with special note to cfg[key] = systemCfg[key];
given the new config has two calls to System.config
and two packages
entries we end up overwriting the first cfg.packages
entry. We should be merging them or handling them independently.
@AdamWillden What's your bundle config looks like? It would be great if you could point me to a github repo with minimum code that reproduces this bug. However, I am trying to setup it up with skeleton-navigation and see if I can reproduce it. Thanks.
@ahmedshuhel I should be able to sort you out a repo and share a link on gitter but won't be till tonight at best (0830 UK time currently)
@AdamWillden Sure. That would be great.
@ahmedshuhel I tried doing this last night but came up against unrelated issues post-upgrade. I'm working on it and you'll have it as soon as I can (home-life permitting)
@ahmedshuhel I've just linked you a repro on gitter
npm install
(this will do jspm install)
gulp build
gulp bundle
Notes:
depCache
option enabled causes me issues on our CI server (if it caused issues locally I didn't notice). I'm having to run with depCache
disabledgulp unbundle
will need fixing once bundle is fixedexport-release
task in the skeleton as the jspm.normalize
function seemingly no longer returns the base path (e.g. 'jspm_packages\npm\font-awesome@4.7.0') but the mainAny issues let me know and I'll be happy to help! The code I've linked is part of our internal company library, I'm pretty sure this skeleton doen't reference anything on our NPM enterprise server so you should be okay running npm install
:+1:
@AdamWillden Pushed a fix. Give it a try and let us know. Install with npm i aurelia-bundler@beta -S
@ahmedshuhel it still seems to be removing the same local package definition for me (tried with npm i ... --save-dev
also)
Could this be a possibility?
the systemjs-builder dependency is old (0.15->0.16) and rejects the local package definition as invalid
It would be much nicer if the bundles section were simply added to one of the existing config calls rather than it rewriting the entire file with a new single config call.
Though I guess that may be at odds with the ability to pass multiple config files?
@ahmedshuhel I tried beta.3
and that worked to keep the required entry! :-) When i did the install the other day I only got beta.2
I stand by my previous comment with regards to not rewriting the entire config with a single call, it'd be much nicer.
@ahmedshuhel yeah if I gulp bundle
(which makes it a single config call), gulp unbundle
(maintains the single config call) then jspm install some-package
the file reverts to having two calls again. Which means the file is never consistent. Not a big deal but a bit 'untidy'. Feel free to keep this closed as the root issue is fixed but perhaps we should open an issue for a future enhancement?
@AdamWillden We are aware of that problem (bundler collapsing it into a single SystemJS.config({...})
call). Let's create a separate improvement ticket for that.
Cheers @ahmedshuhel. Thank you very much for your work on this!
I'm submitting a bug report or I'm submitting a feature request I'm not sure.
Please tell us about your environment:
Operating System: Windows 10
Node Version: 7.5.0
NPM Version: 4.2.0
JSPM Version JSPM 0.17.0-beta.40
Language: TypeScript 2.1.5
Current behavior: Given a
jspm.config.js
like the following:While the bundle task works without any errors the resultant file is missing one section:
I suspect (guess) this might be because the
systemjs-builder
dependency is old (0.15->0.16) and rejects the local package definition as invalid. I tried cloing this repo but I can't get anything to build and so couldn't test that theory.Another note to make: jspm 0.17 appears to separate the
jspm.config.js
file into two parts (i.e. twoSystemJS.config
calls) as you can see above. The I've checked the bundler code and the reader doesn't take into consideration that a single file could have multiple calls although I don't think this is an issue here, A singleSystemJS.config
call will work so long as this missing package entry is included (I've manually included the missing entry and it works).Expected/desired behavior: The local package definition is included in the bundle so that the bundler functions for jspm 0.17 projects. Especially now that loader-default is compatible (https://github.com/aurelia/loader-default/commit/a4607b9)
/cc @ahmedshuhel