Skip to content

Commit 6047bf5

Browse files
committed
Add check for the case of index.js in root
1 parent b7944f2 commit 6047bf5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/common/templates/parcel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class ParcelTemplate extends Template {
1010
getEntries(configurationFiles: { [type: string]: Object }) {
1111
const entries = [];
1212

13-
if (typeof document !== 'undefined') {
13+
if (typeof document !== 'undefined' && document.location.pathname !== '/') {
1414
// Push the location of the address bar, eg. when someone has a file
1515
// /2.html open, you actually want to have that as entry point instead
1616
// of index.html.

0 commit comments

Comments
 (0)