Open abruzzi opened 8 years ago
module.exports = {
entry: {
'test': 'mocha!./src/main/resources/static/specs/index.js'
},
output: {
path: "tests/",
filename: "[name].bundle.js",
publicPath: '/tests'
},
devServer: {
host: "localhost",
port: "9100"
}
};
var context = require.context('.', true, /.+Spec\.js?$/);
context.keys().forEach(context);
module.exports = context;
<!DOCTYPE html>
<html>
<head>
<title>Mocha Specs</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./node_modules/mocha/mocha.css" />
<script src="tests/test.bundle.js"></script>
</head>
<body>
</body>
</html>