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

Minor bump in usability #932

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from
Open

Conversation

jeff-hykin
Copy link

From #6887

  • add npm install command
  • add notes for edgecase of npm init -y causing the package.json to have a main that conflicts with parcel

From #6887 
- add npm install command
- add notes for edgecase of `npm init -y` causing the package.json to have a main that conflicts with parcel
@height
Copy link

height bot commented Sep 11, 2021

Link Height tasks by mentioning a task ID in the pull request title or description, commit messages, or comments.

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@vercel
Copy link

vercel bot commented Sep 11, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/devongovett/website/6HrzzHRTUu4LieEez7cUnzNBSa6s
✅ Preview: https://website-git-fork-jeff-hykin-patch-1-devongovett.vercel.app

@@ -39,6 +40,8 @@ let bundler = new Parcel({
{% endsamplefile %}
{% endsample %}

Note: If your package.json contains a "main" field, such as `"main": "index.js"` that is going to be used as the output destination by default. If no main is specified, then Parcel will default to creating a `dist/` folder.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the right place for this. It has nothing to do with the Parcel API. The Targets page already discusses these fields.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you're saying, and I agree the current comment/info belongs on the target page.

But, from my side a problem still exists, because even having used parcel for years I've been struggling to get even the most basic setup working with parcel 2. The error message around "main" doesn't link to the target page.

As a potential compromise, is there a bundler argument for node.js that sets the output folder/file? When people are copying and pasting the example code, having an output argument that overrides the "main" from the package json would side step the problem caused by npm init -y.

@@ -15,6 +15,7 @@ The Parcel API can be used through the `@parcel/core` package. You'll also need

```shell
yarn add @parcel/core @parcel/config-default
npm install @parcel/core@next @parcel/config-default@next
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather not do this and instead change the tags to point to latest. Otherwise we will have to update this again when Parcel 2.0.0 is released.

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

Successfully merging this pull request may close these issues.

None yet

2 participants