Chrome 61: Unexpected token d'importation

Exécutant Chrome 61 qui est censé supporter le module de chargement avec import.

En effet Paul démo fonctionne pour moi. Cependant, lorsque j'essaie moi-même je reçois un JS erreur "Unexpected token de l'importation". Chrome semble rechigner à l' import:

test.html

<!doctype html> 
<html>
<body>
<script src="test.js"></script>
</body>
</html>

test.js:

import {hello} from './something.js'
console.log(hello())

something.js

export {hello}
function hello() {
    return "hello world"
}

Pourquoi Chrome comprends pas "importer"

InformationsquelleAutor Marc | 2017-09-19