Closed mikew closed 9 years ago
Can you show the error message you're seeing? Can you post a full example that has the issue? Can you make sure your dependencies are up-to-date? I just tested with the following project and had no issues:
//build.js
var fs = require('fs');
var browserify = require('browserify');
var babelify = require('babelify');
var reactHotTransform = require('react-hot-transform');
var hmr = require('browserify-hmr');
var watchify = require('watchify');
var bundle = browserify('./index.js', {
debug: true,
});
bundle.transform(babelify, { stage: 0 });
bundle.transform(reactHotTransform);
bundle.plugin(hmr);
bundle.bundle().pipe(fs.createWriteStream('bundle.js'));
//index.js
var React = require('react');
console.log('foo bar');
$ npm i browserify watchify react-hot-transform browserify-hmr babelify react
...
$ node build.js
22:07:46 GMT-0700 (PDT) [HMR] Emitting updates
22:07:46 GMT-0700 (PDT) [HMR] Listening on localhost:3123
Can you make sure your dependencies are up-to-date?
That was the issue, updating browserify kicked everything into gear.
Works fine with
debug: false
, but then there's no sourcemaps. here's the example code: