I followed Smooch instructions with no success.
Here is the minimal code that fails for me:
<!doctype html><html>
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js"></script>
<script>
require.config({
"paths": {
"smooch": "https://cdn.smooch.io/smooch.min"
}
});
// Tried this
require(["require", "smooch"], function(require){
var Smooch = require("smooch");
console.log(Smooch); // → undefined
});
// Tried that
require(["smooch"], function(Smooch){
console.log(Smooch); // → undefined
});
</script>
</head>
<body></body>
</html>
require
returns me an undefined
so no Smooch.init(...)
for me. Tested in both Firefox and Chrome.
Am I doing something wrong ?