Parcel: When using multiple entry files it only serves or bundles first html file

Created on 26 Nov 2018  路  9Comments  路  Source: parcel-bundler/parcel

馃悰 bug report

I'm not sure if I'm missing something, but I tried to use parcel to bundle multiple entry files by following documentation but ran into issues.

馃帥 Configuration (.babelrc, package.json, cli command)

package.json

{
  "name": "parcel-hello",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "parcel-bundler": "^1.10.3"
  }
}

home.html

<p>foo</p>

about.html

<div>bar</div>

CLI command

parcel home.html about.html

馃 Expected Behavior

Expected parcel to serve home.html and about.html individually as per documentation.

http://localhost:1234/home.html => home.html

http://localhost:1234/about.html => about.html

馃槸 Current Behavior

Parcel serves only the first file that was passed to parcel cli command. Above two links points to same generated html file.

http://localhost:1234/home.html => http://localhost:1234/about.html => home.html

馃實 Your Environment

| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 1.4.1
| Node | 10.12.0
| npm/Yarn | 6.4.1
| Operating System | macOS Mojave 10.14.1

Good First Issue Bug

Most helpful comment

Same issue here [email protected] does not serve any HTML when using multiple entries.

All 9 comments

I'm unable to reproduce this with parcel 1.10.3.

I could confirm that it works fine with 1.10.3, however, the issue is reproducible on the older 1.4.1. Can be closed?

Yeah I personally think closing would make sense if this is fixed in a newer version.

Can confirm. I have Parcel ^1.10.3, have same case as the OP, exact same problem.

This is very strange, are you sure yarn.lock is not overriding the current package.json version with an older one? Which OS?

I'm getting the same issue now with "parcel": "^2.0.0-alpha.3.2"

Multi html entries seem to be broken with [email protected] as well; the dev server doesn't serve any HTML.

However parcel build one.html two.html does work as expected.

Same issue here [email protected] does not serve any HTML when using multiple entries.

+1

Was this page helpful?
0 / 5 - 0 ratings