-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 does not always understand the source code of modules imported via source
in package.json
#4549
Comments
Is still relevant but is no longer an issue for me personally, feel free to close. |
I think I've hit a variant of this, but mostly because I've got a symlink'ed node_modules
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. |
I've hit the same problem @palfrey did, same dependency, same error - in my case because I'm using pnpm, which symlinks all dependencies in node_modules. Could you please re-open? |
🐛 bug report
Resolving modules using
source
inpackage.json
does not work if the modules use an alias that Parcel does not understand i.e@
->./src
.🎛 Configuration (.babelrc, package.json, cli command)
.babelrc
:Code:
I am importing a linked module like so:
And
some/module/package.json
looks like:And that modules source looks like this:
And Parcel fails with the following error:
🤔 Expected Behavior
In an ideal world I would like to disable using
source
in instances where Parcel cannot "understand" the module source code, as mentioned here.😯 Current Behavior
Parcel fails to compile the source component with the following error:
💁 Possible Solution
Allow a flag to disable reading from
source
and instead use the compiled output.Alternative would be to not use
source
in my projects, unfortunately usingmicrobundle
the way I am that is not currently possible.🔦 Context
Prevents me from being unable to compile using a relatively common place practice (alias), this is especially prevalent in the Vue world.
💻 Code Sample
Provided as part of description.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: