alexisvincent/systemjs-hot-reloader

JSPM Bundle with dev flag (-d) error

wongwill86 opened this issue · 8 comments

Hello,
I'm trying to add this into my development bundle but it's failing.

~/src/projectfoo$ jspm bundle systemjs-hot-reloader test.js -d
     Building the bundle tree for systemjs-hot-reloader...

err  TypeError: name.match is not a function
    at isPlain (./src/projectfoo/node_modules/systemjs-builder/lib/trace.js:204:58)
    at toPackagePath (./src/projectfoo/node_modules/systemjs-builder/lib/trace.js:222:13)
    at ./src/projectfoo/node_modules/systemjs-builder/lib/trace.js:300:20

it seems that trace.js is trying to resolve the dependency's (systemjs-hmr) mapped package ("false"). Is this due to https://github.com/alexisvincent/systemjs-hmr/blob/master/package.json#L66?

Am I missing a configuration for a dev bundling?

I think you forgot the build config specified in the readme.

{
  ...
  "map": {
    ...
    "@hot": "@empty"
  }
}

Sorry, I completely mis-answered. Let me see

Sorry, can't see superficially what the issue is. Can you provide me with a repo reproducing the error?

I'll be happy to:
https://github.com/wongwill86/hmrissue

you can run

npm run init

then bundling normally works

npm run bundle

but bundling with jspm dev flag has errors

npm run bundle:dev

Awesome :) Thanks. Will check in the morning

Fixed in systemjs-hmr@v2.0.9 :) Thanks for the issue, your hint was correct :)

great! thank you!