Codesandbox-client: Vanilla (Parcel) Unreliable Behavior When index.html Under Other Path (for example, in src)

Created on 2 Aug 2019  路  6Comments  路  Source: codesandbox/codesandbox-client

馃悰 bug report

Description of the problem

Using the Parcel bundler, the index.html file cannot be renamed or moved.

If the file is under a different path / name other than /index.html directly in the root, then there is unusual half-working unreliable behavior.

You can see this in the following sandboxes:

1. Index under /index.html: https://codesandbox.io/s/frozen-public-vanilla-parcel-bug-index-in-root-03p3w

With the index.html file in the root, everything works normally, including HTML from the HTML file itself.

The original DOM innerHTML of the body is as expected.

Screen Shot 2019-08-01 at 15 47 36

2. Index under /src/index.html: https://codesandbox.io/s/frozen-public-vanilla-parcel-bug-index-in-src-lcrew

With the index.html file in the src folder, some things work properly (such as modifying the document with JavaScript), but the DOM innerHTML content of the body is not stable and also does not match that of the HTML file.

Screen Shot 2019-08-01 at 15 48 53

Sometimes it even has CodeSandbox metadata in it:

Screen Shot 2019-08-01 at 15 48 09

How has this issue affected you? What are you trying to accomplish?

I want to be able to move and rename the index.html file as I wish, such as moving it under src/index.html.

Your Environment

| Software | Name/Version |
| ---------------- | ------------ |
| 小odesandbox | PROD-1564153504-2b37aae59 |
| Browser | Chrome 76.0.3809.87 (Official Build) (64-bit) |
| Operating System | macOS 10.14.6 (18G84) |

API

All 6 comments

Ah this actually looks a lot like #2030 from @wannikid...

Maybe one of these issues should be closed. cc @lbogdan

If we close one, we should make sure that the information from both is captured somewhere.

I believe the problem still exists. Here is the example Parcel sandbox made from Vanilla template by moving index.html into src folder.
https://codesandbox.io/s/parcel-html-in-src-bug-example-9espj?file=/package.json
html is not served properly.
When I download this sandbox locally and run 'start' command, everything works.

This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed.

Not stale

This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed.

Still not stale.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rdmurphy picture rdmurphy  路  20Comments

gautamarora picture gautamarora  路  50Comments

Vill3m picture Vill3m  路  23Comments

gautamarora picture gautamarora  路  30Comments

MichMich picture MichMich  路  35Comments