alexisvincent / systemjs-hot-reloader

reloads your modules as needed so that you can have satisfyingly fast feedback loop when developing your app
MIT License
228 stars 36 forks source link

JSPM Bundle with dev flag (-d) error #138

Closed wongwill86 closed 7 years ago

wongwill86 commented 7 years ago

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?

alexisvincent commented 7 years ago

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

{
  ...
  "map": {
    ...
    "@hot": "@empty"
  }
}
alexisvincent commented 7 years ago

Just above this link https://github.com/alexisvincent/systemjs-hot-reloader/blob/master/README.md#production

alexisvincent commented 7 years ago

Sorry, I completely mis-answered. Let me see

alexisvincent commented 7 years ago

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

wongwill86 commented 7 years ago

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
alexisvincent commented 7 years ago

Awesome :) Thanks. Will check in the morning

alexisvincent commented 7 years ago

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

wongwill86 commented 7 years ago

great! thank you!