你好,我看不到我的铬元素输出。以下是我的文件。 https://i.stack.imgur.com/fhn3E.jpg https://i.stack.imgur.com/TOuXj.jpg
const path = require("path");
module.exports = {
entry: ["./src/js/index.js"],
output: {
path: path.resolve(__dirname, "dist/js"),
filename: "bundle.js"
}
};
https://i.stack.imgur.com/SulP0.jpg
{
"name": "forkify",
"version": "1.0.0",
"description": "forkify project",
"main": "index.js",
"scripts": {
"dev": "webpack --mode development",
"build": "webpack --mode production"
},
"author": "Gaurav Yadav guided by Jonas",
"license": "ISC",
"devDependencies": {
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10"
}
}
https://i.stack.imgur.com/os28l.jpg
console.log("Export data");
export default 23;
https://i.stack.imgur.com/GEiAn.jpg
// Global app controller
import num from "./test";
console.log(`${num} from test`);
https://i.stack.imgur.com/T6m8u.jpg
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>test</title>
</head>
<body>
<script>
src = "js/bundle.js";
</script>
</body>
</html>
我的项目文件夹名是FORKIFY。有三个子文件夹 dist,src,nodemodules和三个文件 pacakage-lock.json,pacakage.json,webpack.config.js。目录图像目录。请让我知道为什么我的控制台是空的?我在跟踪这段视频进行编码 问题在哪里,在哪个文件里??我需要更改我的webpack配置文件吗? https://www.youtube.com/watch?v=sBEryysS1Tg&list=PL15NLmjJalxydhO9orvXv_yvgZEfrDQvX&index=127
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。