Handlebars

Hi!

I’m trying to deal with Handlebars.
My HTML:

<!DOCTYPE html>
<html>
	<head>
		<title>Handlebars</title> 
		<link href="./style.css" type = "text/css" rel = "stylesheet"/>
		<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.4.2/handlebars.amd.js"></script>
		<script src="./main.js" defer></script> 
	</head>
	<body>
		<h2>Test handlebars framework</h2>
		<div id="bar"></div>
	<script id="entry-template" type="text/x-handlebars-template">
	{{one}}
	</body>
	
</html>

Main.js

let source = document.getElementById('entry-template').innerHTML;
let template = Handlebars.compile(source);

let context = {
	one: true,
	arrOne: [1, 2, 3, 4]
};

let htmlResult = template(context);
document.getElementById('bar').innerHTML = htmlResult;

It throws two errors:

Uncaught ReferenceError: define is not defined
at handlebars.js:19

main.js:2 Uncaught ReferenceError: Handlebars is not defined
at main.js:2

I think linked Handlebars framework doesn’t work properly.
How to repair this?

This link doesn’t work.

<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.11/handlebars.amd.js"></script>

But it works

<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.4.2/handlebars.min.js"></script>