Experience-Monks / hihat

:tophat: local Node/Browser development with Chrome DevTools
MIT License
443 stars 19 forks source link

source maps in entry file #17

Open mattdesl opened 9 years ago

mattdesl commented 9 years ago

example.js

var fs = require('fs')
debugger

no source maps:

screen shot 2015-07-28 at 2 50 43 pm

however, it works when you require('./foo.js') from an entry.

mattdesl commented 9 years ago

This happens when index.html points to the same file (e.g. test.js) as we are serving and bundling.

A workaround:

hihat test.js --serve bundle.js

To fix this bug, we could always use bundle.js -- of course, if somebody does hihat bundle.js the issue will appear again. Maybe using a unique hash or something? Or maybe there is a better solution.