-
Notifications
You must be signed in to change notification settings - Fork 156
Closed
Labels
Description
Browsers have had support for loading ECMAScript modules directly (no tools like Webpack required)
in index.html, I do this
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<script type="module" src="neo4j.js"></script>
</head>
<body>
// Do some stuff ....
</body>
</html>
in neo4j.js
/*jshint esversion: 6 */
import neo4j from 'https://unpkg.com/neo4j-driver@4.0.1/lib/browser/neo4j-web.min.js';
I got this error
SyntaxError: The requested module 'https://unpkg.com/neo4j-driver@4.0.1/lib/browser/neo4j-web.min.js' does not provide an export named 'default'
With this
/*jshint esversion: 6 */
import { neo4j } from 'https://unpkg.com/neo4j-driver@4.0.1/lib/browser/neo4j-web.min.js';
I got
SyntaxError: The requested module 'https://unpkg.com/neo4j-driver@4.0.1/lib/browser/neo4j-web.min.js' does not provide an export named 'neo4j'
Is possible to use neo4j-javascript-driver has module in browser?
halvardssm and ajmeese7