Skip to content

Commit

Permalink
Add check for the case of index.js in root
Browse files Browse the repository at this point in the history
  • Loading branch information
CompuIves committed Jun 23, 2018
1 parent b7944f2 commit 6047bf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/common/templates/parcel.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ParcelTemplate extends Template {
getEntries(configurationFiles: { [type: string]: Object }) {
const entries = [];

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

0 comments on commit 6047bf5

Please sign in to comment.