I have been trying to use ethereumjs-tx in a browser. I have downloaded the browser builds from here https://github.com/ethereumjs/browser-builds/tree/master/dist
This is my code snippet
<head>
<title></title>
<meta charset="utf-8" />
<script type="text/javascript" src="ethereumjs-tx.js"></script>
</head>
<body>
<script>
var Tx = require('ethereumjs-tx');
var privateKey = new Buffer('e331b6d69882b4cb4ea581d88e0b604039a3de5967688d3dcffdd2270c0fd109', 'hex');
var rawTx = {
nonce: '00',
gasPrice: '09184e72a000',
gasLimit: '2710',
to: '0000000000000000000000000000000000000000',
value: '00',
data: '7f7465737432000000000000000000000000000000000000000000000000000000600057'
};
var tx = new Tx(rawTx);
tx.sign(privateKey);
var serializedTx = tx.serialize();
</script>
However, it keeps throwing the error in the console Uncaught ReferenceError: require is not defined