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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parcel 2: multiples entries point get clobbered in dev and unexpected index behavior in prod #4353

Open
dephiros opened this issue Mar 20, 2020 · 1 comment

Comments

@dephiros
Copy link

🐛 bug report

Not sure if i should add directly to #3377 so I just create a new issue

Trying to use parcel to process the output of 11ty. So basically run 11ty to generate a bunch of html files. Then run parcel **/*.html so parcel can fill in the js and css

🎛 Configuration (.babelrc, package.json, cli command)

Please see https://github.com/dephiros/11ty-tailwind

Reproduce steps:

  • Clone https://github.com/dephiros/11ty-tailwind
  • (NOTE: Taskfile contains the scripts instead of package.json)
  • Run ./Taskfile clean && ./Taskfile
    • Open the browser localhost:1234 and notice that the content is from a markdown file instead of from the actual index.html file. Open /blog or any others and see the same content
  • Run ./Taskfile clean && ./Taskfile stage (prod build and serve)
    • Open the browser at localhost:3000 and you should hit a 404. Check the dist folder, you should see something similar to _dist.aaa4affa.html instead of index.html. Check all the blog folder and parcel generate index.html as expected

🤔 Expected Behavior

Parcel should retain the folder structure and generate the entries correctly in dev and prod

😯 Current Behavior

See Reproduce steps

💁 Possible Solution

N/A

🔦 Context

Trying to build a blog of 11ty and test out parcel as potential quick solution to generate js/css for each blog entry/page

💻 Code Sample

https://github.com/dephiros/11ty-tailwind

🌍 Your Environment

Software Version(s)
Parcel ^2.0.0-alpha.3.2
Node v10.19.0
npm/Yarn yarn@1.21.1
Operating System 10.15.3
@mischnic
Copy link
Member

mischnic commented Apr 6, 2020

The problem here is <link rel="alternate" href="." type="application/atom+xml" title="" />.

Running parcel build index.html with this

<!DOCTYPE html>
<html lang="en">
  <head>
    <link rel="alternate" href="." type="application/atom+xml" title="" />
  </head>
  <body>
    Hello
  </body>
</html>

creates a html bundle with a hash.
This explains the behaviour of both parcel serve and parcel build.

But I think this also not the output you want anyway.

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

No branches or pull requests

2 participants