browserify / watchify

watch mode for browserify builds
Other
1.79k stars 181 forks source link

How to update sourcemaps? #290

Closed danielabar closed 8 years ago

danielabar commented 8 years ago

I'm using watchify with this gulp recipe: Fast browserify builds with watchify

It works and is rebuilding the bundle on any change. However, the source maps are not being updated with the changes. Does anyone know how to get the sourcemaps updated?

Versions from package.json

"devDependencies": {
    "browserify": "^12.0.1",
    "gulp": "^3.9.0",
    "gulp-eslint": "^1.1.1",
    "gulp-sourcemaps": "^1.6.0",
    "gulp-util": "^3.0.7",
    "lodash.assign": "^3.2.0",
    "vinyl-buffer": "^1.0.0",
    "vinyl-source-stream": "^1.1.0",
    "watchify": "^3.6.1"
  }
zertosh commented 8 years ago

But you're getting the first source map? Hmm. That doesn't sound right. Can you provide more info? Preferably a reproducible example?

danielabar commented 8 years ago

I managed to fix it by adding in browserSync, and reloading whenever the bundle changes. Not sure if that's the right way to fix the problem, but would have needed browserSync/auto-reload in any case.