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

How do I exclude source map loading of a specific module? #2346

Closed
mrcoles opened this issue Dec 2, 2018 · 4 comments
Closed

How do I exclude source map loading of a specific module? #2346

mrcoles opened this issue Dec 2, 2018 · 4 comments

Comments

@mrcoles
Copy link

mrcoles commented Dec 2, 2018

🐛 bug report

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

Using parcel@1.10.1, run the following bash commands:

mkdir source-map-example
cd source-map-example/
yarn init -y
yarn add aws-amplify@1.1.10
echo "import { Auth } from 'aws-amplify';" > index.js
parcel start index.js

You get a string of warnings like:

⚠️ Could not load source file "../src/index.ts" in source map of "node_modules/aws-amplify/lib/index.js".

🤔 Expected Behavior

This is expected because that repo includes the source maps, but not the actual source. Is there, however, a way for me to turn off source-map-loading for that module?

😯 Current Behavior

I don’t see an option to set excludes on source map loading.

💁 Possible Solution

It appears in webpack, people use the source-map-loader plugin and with that, they can specify something like this:

exclude: '/node_modules/aws-amplify'

🔦 Context

It just leads to a really noisy console and makes me fearful that I’ll miss actual important warnings or errors.

💻 Code Sample

Setup in configuration.

🌍 Your Environment

Software Version(s)
Parcel 1.10.1
Node v10.11.0
Yarn 1.6.0
Operating System Mac OSX 10.13.6
@mischnic
Copy link
Member

mischnic commented Jan 6, 2019

You could use parcel --log-level 1.
As previously noted, this needs to be fixed by the published package (aws-amplify in this case).

@mischnic mischnic closed this as completed Jan 6, 2019
@apearson
Copy link

apearson commented Aug 22, 2019

@mischnic Could you link to the "previously noted"?

Sorry to open a closed issue.

@kwelch
Copy link
Contributor

kwelch commented Aug 22, 2019

It is in reference to the OP Possible Solution section.

@Maker-Mark
Copy link

Reopening this, I don't see a way to exclude just one node_module package. Is there another solution that is not migrating to parcel 2?

tash-2s added a commit to tash-2s/onchain-game-2019_archive that referenced this issue Oct 5, 2023
parcel-bundler/parcel#2346 (comment)

---

Original commit (web-client): ee8c248fcf87a4b355c5d1f38dc2c8a5b075366b
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

No branches or pull requests

5 participants