尝试运行包裹index.html 找不到条目 在Bundler.bundle()
parcel index.html
Server running at http://localhost:1234
× No entries found.
at Bundler.bundle (file_location of bundler)
答案 0 :(得分:0)
这个问题已有一年多的历史了,但是如果有人正在谷歌搜索这个问题并且遇到和我一样的问题。
尝试将babel包含在package.json中,并确保项目中包含.babelrc文件。我的看起来像这样:
.babelrc
{"presets": ["@babel/preset-react", "@babel/preset-env"]}
package.json
“依赖项”:{
"@babel/core": "^7.10.5",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/preset-env": "^7.10.4",
"@babel/preset-react": "^7.10.4",
"parcel": "^1.12.4",
"react": "^16.13.1",
"react-dom": "^16.13.1"
}
希望如此。
如果需要,请在此处提供更多信息:https://github.com/parcel-bundler/parcel/issues/2095