-
Notifications
You must be signed in to change notification settings - Fork 472
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
base: v2
Are you sure you want to change the base?
Conversation
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
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/devongovett/website/6HrzzHRTUu4LieEez7cUnzNBSa6s |
@@ -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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
From #6887
npm init -y
causing the package.json to have a main that conflicts with parcel