我有 3 个文件一个 HTML,2 个名为 app.js 和 customer .js 的 javascript 文件
我有一个 HTML 页面,我在上面写了这个
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
hello
<script src="app.js" type="module"></script>
</body>
</html>
我刚刚将 app.js 加载到此页面中
app.js 包含这个
import {person} from "./customer";
console.log("helllo");
在 customer.js 我有这个
const person={
name:"hello"
}
export default person;
我收到错误显示的导入错误
GET http://127.0.0.1:5500/customer net::ERR_ABORTED 404 (Not Found)
我是Web开发的新手,请帮助我。