Serving index.html with apache on localhost:
<!-- index.html -->
<!DOCTYPE html>
<html>
<head>
<script src="js/one.js" type="module"></script>
</head>
<body>
</body>
</html>
and
// one.js
import {test} from './two.js';
// two.js
export function test() {
return 'haha';
}
Console error:
Uncaught SyntaxError: The requested module './two.js' does not provide an export named 'test'
Browser: Google Chrome Version 67.0.3396.99 (Official Build) (64-bit)
Solutions?
from ES6 The requested module '...' does not provide an export named '...'
No comments:
Post a Comment