【发布时间】:2020-04-01 05:38:22
【问题描述】:
我正在尝试使用Parcel 启动并运行,但我无法进行基本设置。我想提供一个静态 HTML 页面,该页面在更改时会自动重新加载。
当我转到 http://localhost:1234 时,Parcel 会为我的页面提供服务。如果我更改 index.html 中的任何内容,它不会重新加载...或者它会以空响应重新加载。
版本
parcel: 1.12.4
npm: 6.12.1
node: v13.3.0
index.html
<!doctype html>
<html>
<head>
<title>Tinsel town</title>
<script src="app.js"></script>
</head>
<body>
<h1>Tinsel…</h1>
</body>
</html>
app.js
// empty
壳牌
matt$ parcel index.html --log-level 5
[13:20:42]: Server running at http://localhost:1234
[13:20:42]: Building...
[13:20:42]: Building index.html...
[13:20:43]: Building app.js...
[13:20:43]: Built app.js...
[13:20:43]: Built index.html...
[13:20:43]: Producing bundles...
[13:20:43]: Packaging...
[13:20:43]: Building hmr-runtime.js...
[13:20:43]: Built ../../../usr/lib/node_modules/parcel-bundler/src/builtins/hmr-runtime.js...
[13:20:43]: ✨ Built in 477ms.
[13:20:49]: Building...
[13:20:49]: Producing bundles...
[13:20:49]: Packaging...
[13:20:49]: ✨ Built in 2ms.
【问题讨论】:
标签: javascript vim parceljs