Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot serve entry file from a dot folder #2628

Closed
adrianmcli opened this issue Feb 10, 2019 · 2 comments 路 Fixed by #2641
Closed

Cannot serve entry file from a dot folder #2628

adrianmcli opened this issue Feb 10, 2019 · 2 comments 路 Fixed by #2641

Comments

@adrianmcli
Copy link

馃悰 bug report

When the entry file is inside a dot folder, I get the following error in my browser:

Uncaught SyntaxError: Unexpected token <

It seems like the server might be serving the HTML as JS for some reason (instead of serving the real JS file).

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

No Babel config, Parcel is the only dependency, command:

parcel .myFolder/index.html

馃 Expected Behavior

It should not error out.

馃槸 Current Behavior

Errors out in the browser:

Uncaught SyntaxError: Unexpected token <

馃拋 Possible Solution

Maybe something is wrong with the way the server parses the paths? I am not sure about Parcel internals.

馃敠 Context

I want to have my entry point file inside a dot folder (i.e. .myFolder). That's all.

馃捇 Code Sample

Reproduction repo here: https://github.com/adrianmcli/repro-parcel-dot-folder

馃實 Your Environment

Software Version(s)
Parcel 1.11.0
Node v10.13.0
npm/Yarn 6.5.0
Operating System MacOS 10.14.2
@adrianmcli adrianmcli changed the title Entry file in dot folder will cause error Cannot serve entry file from a dot folder Feb 10, 2019
@lustoykov
Copy link
Contributor

Hello @adrianmcli, thanks for the report.

I was not able to reproduce the behaviour and the error indicates some problem in index.html as opposed to folder structure. Do you mind sharing the contents of index.html?

@adrianmcli
Copy link
Author

@lustoykov I posted a reproduction repo above. Here is the link again: https://github.com/adrianmcli/repro-parcel-dot-folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants