Skip to content

Instantly share code, notes, and snippets.

@graue
Created March 4, 2014 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save graue/9353602 to your computer and use it in GitHub Desktop.
Save graue/9353602 to your computer and use it in GitHub Desktop.
Browserify source map test case
var _ = require('underscore');
function foo() {
_(['foo','bar','baz']).each(function(s) {
console.log(s);
});
}
module.exports = foo;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test page</title>
</head>
<body>
<script src="bundle.js"></script>
</body>
</html>
var foo = require('./foo');
foo();
{
"name": "sourcemaptestcase",
"version": "0.0.1",
"private": true,
"dependencies": {
"underscore": "1.6.0"
},
"devDependencies": {
"browserify": "3.30.1"
},
"scripts": {
"build-js": "browserify -d main.js >bundle.js"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment